The toolkit provides capabilities to use optimization algorithms through an API. It means that the user embeds the optimization code into its own inference pipeline, which is usually a model validation script for a full-precision model. Here we describe a sample of how to do this embedding on the ImageNet classification task.
In order to use optimization features one should implement the following interfaces which are required for the optimization process:
engines
folder in the compression
directory.sample
folder.AccuracyAwareQuantization
algorithm and implements an accuracy metric calculation. An example of the Accuracy Top-1 metric can be found in the sample
folder.Sample demonstrates quantization of the classification model and uses API implementations described above and can be found in the sample
folder.
In the instructions below, the Post-Training Optimization Tool directory <INSTALL_DIR>/deployment_tools/tools/post_training_optimization_toolkit
is referred to as <POT_DIR>
. <INSTALL_DIR>
is the directory where Intel® Distribution of OpenVINO™ toolkit is installed.
downloader
tool to download a model from the Open Model Zoo repository: converter
tool to generate the IRv10 model: sample
folder and launch the sample script: -w
, --weights
options.WARNING: Sample works with predefined central crop and resize. In other words, it suits only for models with TensorFlow* preproc.