meituan / YOLOv6

YOLOv6: a single-stage object detection framework dedicated to industrial applications.
GNU General Public License v3.0
5.66k stars 1.02k forks source link

Weights in ptq training config #552

Open oforomar opened 1 year ago

oforomar commented 1 year ago

Before Asking

Search before asking

Question

Hello, I am trying to do PTQ with yolov6n on a custom dataset. I have followed the reptopt tutorial, and obtained the scales and weights. However I am not sure about the weights that I am supposed to use in the config file in the calib field here:- qat = dict( calib_pt = './assets/v6s_n_calib_max.pt', sensitive_layers_skip = False, sensitive_layers_list=[], )

Additional

No response

xingyueye commented 1 year ago

@oforomar You could generate a v6s_n_calib_max.pt follow the step2 in sensitivity_analyse.py

model_ptq= do_ptq(model, train_loader, args.batch_number, device)
torch.save({'model': model_ptq}, args.weights.replace('.pt', '_calib.pt'))
oforomar commented 1 year ago

Thank you, I will run it and report back.