Closed APeiZou closed 3 years ago
You can load the model and call the torchslim.quantization.qat.QATSolver to do the quantization aware train,the model can be automatically converted into the tensorrt format. The simple example is here https://github.com/THU-MIG/torch-model-compression/blob/main/examples/torchslim/pytorch-cifar/qat.py The source code is here https://github.com/THU-MIG/torch-model-compression/blob/main/torchslim/quantizing/qat.py
How to quantize and compress the trained model??????