#1lanhao回复需要检查qconfig内的参数是否正确
这是我量化时的代码
mean = [0.0, 0.0, 0.0]
std = [1/100, 1/100, 1/100]
dtype = "int16" if opt.quantized_mode == 2 or opt.quantized_mode == 4 else "int8"
per_channel = False if opt.quantized_mode == 1 or opt.quantized_mode == 2 else True
qconfig = {'use_avg':False, 'data_scale':1.0, 'mean': mean, 'std': std, 'per_channel': per_channel, 'firstconv':True}
quantized_model = mlu_quantize.quantize_dynamic_mlu(model, qconfig, dtype=dtype, gen_quant=True)
不知道哪里错了,model.to(ct.mlu_device())也写了