666DZY666 / micronet

micronet, a model compression and deploy lib. compression: 1、quantization: quantization-aware-training(QAT), High-Bit(>2b)(DoReFa/Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference)、Low-Bit(≤2b)/Ternary and Binary(TWN/BNN/XNOR-Net); post-training-quantization(PTQ), 8-bit(tensorrt); 2、 pruning: normal、regular and group convolutional channel pruning; 3、 group convolution structure; 4、batch-normalization fuse for quantization. deploy: tensorrt, fp32/fp16/int8(ptq-calibration)、op-adapt(upsample)、dynamic_shape

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to put the quantized model in .jit version?

RiccardoRuggiero opened this issue · comments

Hello everybody & developers. I've taken a look at this repo and I've successfully quantized my model to see results in terms of accuracy. Everything seemed to work fine, however I would like to put my quantized model in .jit form, in order to execute it on a controller or a mobile. However, when I try to execute the following command:

torch.jit.save(torch.jit.script(model), model_filepath)

.. PyTorch turns me an error and so I have no clue of how to put my quantized model in .jit form. Anybody can help me please?