xiehou123456 / ganzhi

0 stars 0 forks source link

量化过程中调用quantizer = torch_quantizer(quant_mode, model, (input))函数的问题 #6

Open xiehou123456 opened 3 years ago

xiehou123456 commented 3 years ago
   在量化过程中,调用quantizer = torch_quantizer(quant_mode, model, (input))函数的时候。遇到RuntimeError: Only tuples, lists and Variables supported as JIT inputs/outputs. Dictionaries and strings are also accepted but their usage is not recommended. But got unsupported type numpy.ndarray问题

image

xiehou123456 commented 3 years ago

base_model.py 198行return out, cur_feat[0].detach().cpu().numpy()改成return out,cur_feat[0].detach()