nncf.config.structures
#
Structures for passing live Python objects into NNCF algorithms.
Classes#
Stores additional arguments for quantization range initialization algorithms. |
|
Stores additional arguments for batchnorm statistics adaptation algorithm. |
|
Stores additional arguments for running the model in the evaluation mode, should this be required for an algorithm. |
- class nncf.config.structures.QuantizationRangeInitArgs(data_loader, device=None)[source]#
Bases:
NNCFExtraConfigStruct
Stores additional arguments for quantization range initialization algorithms.
- Parameters:
data_loader (nncf.common.initialization.dataloader.NNCFDataLoader) – Provides an iterable over the given dataset.
device (Optional[str]) – Device to perform initialization. If device is None then the device of the model parameters will be used.
- class nncf.config.structures.BNAdaptationInitArgs(data_loader, device=None)[source]#
Bases:
NNCFExtraConfigStruct
Stores additional arguments for batchnorm statistics adaptation algorithm.
- Parameters:
data_loader (nncf.common.initialization.dataloader.NNCFDataLoader) – Provides an iterable over the given dataset.
device (Optional[str]) – Device to perform initialization. If device is None then the device of the model parameters will be used.
- class nncf.config.structures.ModelEvaluationArgs(eval_fn)[source]#
Bases:
NNCFExtraConfigStruct
Stores additional arguments for running the model in the evaluation mode, should this be required for an algorithm.
- Parameters:
eval_fn (Callable) – A function accepting a single argument - the model object - and returning the model’s metric on the evaluation split of the dataset corresponding to the model.