--evaluator
Function Usage
Sets the Python script that is based on the Evaluator base class and contains the evaluator.
Include this option if you fail to obtain the .bin dataset that matches your model or you want to use your own script for PTQ.
See Also
This option is mutually exclusive with --input_shape, --data_dir, and --data_types.
Argument
Argument: Python script that contains the evaluator.
Remarks: none.
Suggestions and Benefits
None
Examples
--evaluator=EVALUATOR.py
The following is a script example. Define the calibration() callback function, which calibrates the model by running forward passes, based on the source model and test dataset.
1 2 3 4 5 | class ModelEvaluator(AutoCalibrationEvaluatorBase): # The evaluator for model def calibration(self, model_file, weights_file): # Calibrate the model by running batch_num forward passes. |
Constraints
This option is used only in PTQ scenarios.
Parent topic: Optional.