@Vasiliy_Kuznetsov
I also tried a script with Quantized Aware Training -

  
      github.com
  
  
    raghavgurbaxani/Quantization_Experiments/blob/master/try_qat.py 3
import os
import config as cfg
from model import East
import torch
import utils
import preprossing
import cv2
import numpy as np
import time
import loss

def uninplace(model):
    if hasattr(model, 'inplace'):
        model.inplace = False
    if not model.children():
        return
    for child in model.children():
        uninplace(child)
        
def print_size_of_model(model):


  This file has been truncated. show original

  
  
    
    
  
  


But still the quantized model is bigger than the original model  
I don’t know what’s going wrong here
Original Size:
Size (MB): 6.623636

Fused model Size:
Size (MB): 6.638188

Quantized model Size:
Size (MB): 6.712286

QAT model Size:
Size (MB): 6.712286