TensorRT  7.2.1.6
NVIDIA TensorRT
Looking for a C++ dev who knows TensorRT?
I'm looking for work. Hire me!
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
polygraphy.backend.trt.calibrator Namespace Reference

Functions

def Calibrator (data_loader, cache=None, BaseClass=trt.IInt8MinMaxCalibrator, batch_size=None)
 

Variables

 data_loader
 
 _cache
 
 device_buffers
 
 batch_size
 
 data_loader_iter
 
 num_batches
 
 cache_contents
 
 has_cached_scales
 

Function Documentation

◆ Calibrator()

def polygraphy.backend.trt.calibrator.Calibrator (   data_loader,
  cache = None,
  BaseClass = trt.IInt8MinMaxCalibrator,
  batch_size = None 
)
Supplies calibration data to TensorRT to calibrate the network for INT8 inference.

Args:
    data_loader (Generator -> OrderedDict[str, numpy.ndarray]):
        A generator or iterable that yields a dictionary that maps input names to input NumPy buffers.

        In case you don't know details about the inputs ahead of time, you can access the
        `input_metadata` property in your data loader, which will be set to an `TensorMetadata` instance.
        Note that this does not work for generators or lists.

        The number of calibration batches is controlled by the number of items supplied
        by the data loader.


    cache (Union[str, file-like]):
            Path or file-like object to save/load the calibration cache.
            By default, the calibration cache is not saved.
    BaseClass (type):
            The type of calibrator to inherit from.
            Defaults to trt.IInt8MinMaxCalibrator.
    batch_size (int):
            [DEPRECATED] The size of each batch provided by the data loader.

Variable Documentation

◆ data_loader

polygraphy.backend.trt.calibrator.data_loader

◆ _cache

polygraphy.backend.trt.calibrator._cache
private

◆ device_buffers

polygraphy.backend.trt.calibrator.device_buffers

◆ batch_size

polygraphy.backend.trt.calibrator.batch_size

◆ data_loader_iter

polygraphy.backend.trt.calibrator.data_loader_iter

◆ num_batches

polygraphy.backend.trt.calibrator.num_batches

◆ cache_contents

polygraphy.backend.trt.calibrator.cache_contents

◆ has_cached_scales

polygraphy.backend.trt.calibrator.has_cached_scales