here’s the script for utils -

  
      github.com
  
  
    raghavgurbaxani/Quantization_Experiments/blob/master/utils.py 2
import torch
import os
import config as cfg
from torch.nn import init
import cv2
import numpy as np
import time
import preprossing
import locality_aware_nms


def init_weights(m_list, init_type=cfg.init_type, gain=0.02):
    print("EAST <==> Prepare <==> Init Network'{}' <==> Begin".format(cfg.init_type))
    # this will apply to each layer
    for m in m_list:
        classname = m.__class__.__name__
        if hasattr(m, 'weight') and (classname.find('Conv') != -1 or classname.find('Linear') != -1):
            if init_type == 'normal':
                init.normal_(m.weight.data, 0.0, gain)
            elif init_type == 'xavier':


  This file has been truncated. show original

  
  
    
    
  
  


Also can you suggest the best pruning method for optimal accuracy vs inference speed ? As the model size reduces, atleast can I expect a faster inference speed ?