Skip to content

Quantization Traning

WEBSTERMASTER777 edited this page Aug 30, 2022 · 9 revisions

Quantization

The project makes it possible to get a trained statically or dynamically quantized model.

Dynamic quantization

To obtain a dynamically quantized model, it is necessary to transfer the already trained model to the script dynamic_quantization.py with config file (see how get trained model). After executing the program, the dynamically compressed model will be saved as qmodel.pt.

python dynamic_quantization.py

Static quantization

To obtain a statically quantized model, you need to repeat the same steps as with the training of a conventional model, but the word "quat" is attributed to the names of the scripts being executed

python quant_train.py
python clf_train.py

Clone this wiki locally