Starting with the 2020.1 version, OpenVINO™ toolkit delivers the Post-Training Optimization Tool designed to accelerate the inference of DL models by converting them into a more hardware-friendly representation by applying specific methods that do not require re-training, for example, post-training quantization. For more details about the low-precision flow in OpenVINO™, refer to the Low Precision Optimization Guide.
Post-Training Optimization Toolkit includes standalone command-line tool and Python* API that provide the following key features:
The toolkit is distributed as a part of the OpenVINO release package and available after installation from the
<INSTALL_DIR>/deployment_tools/tools/post_training_optimization_toolkit. It's recommended to create a separate Python* environment before installing the OpenVINO components. To install the toolkit into your environment, follow the steps below:
Now the toolkit is available in the command line by the
The toolkit works with pre-trained models in the OpenVINO Intermediate Representation (IR) format, which means that you need to convert the model using Model Optimizer before running the optimization tool. In addition, it's highly recommended to make sure that the model can be successfully inferred and achieves the similar accuracy numbers as the reference model from the original framework. In order to do this, the AccuracyChecker tool can be used.
To run the command-line Post-Training Optimization Tool:
configsfolder. To simplify this step, an AccuracyChecker configuration file for the full-precision model can be used and referred.
--helparguments or refer to the Command-Line Arguments below.
resultsfolder that is created in the same directory where the tool is run from. Use the
-eoption to evaluate the accuracy directly from the tool.
The following command-line options are available to run the tool:
|Optional. Show help message and exit.|
|Path to a config file with task/model-specific parameters.|
|Optional. Evaluate model on the whole dataset after optimization.|
|Optional. A directory where results are saved. Default: |
|Optional. Save the original (FP32) model.|
|Optional. Save results directly to output directory without additional subfolders.|
|Optional. Log level to print. INFO is by default.|