打开微信,使用扫一扫进入页面后,点击右上角菜单,
点击“发送给朋友”或“分享到朋友圈”完成分享
【问题】:经过pytorch量化感知训练后的模型,支持转换成MLU220离线模型吗?
【错误信息】:
Traceback (most recent call last):
File "mlu_forward_qat.py", line 347, in <module>
mlu_forward( opt.img, use_mlu=True, mlu220 = save_offline_model, fusion= opt.fusion)
File "mlu_forward_qat.py", line 237, in mlu_forward
model = mlu_quantize.quantize_dynamic_mlu(model)
File "/torch/venv3/pytorch/lib/python3.6/site-packages/torch_mlu/core/mlu_quantize.py", line 236, in quantize_dynamic_mlu
model = copy.deepcopy(model)
File "/usr/local/python3.6/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/local/python3.6/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/local/python3.6/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/local/python3.6/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/local/python3.6/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/local/python3.6/lib/python3.6/copy.py", line 306, in _reconstruct
value = deepcopy(value, memo)
File "/usr/local/python3.6/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/local/python3.6/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/local/python3.6/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/local/python3.6/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/local/python3.6/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/local/python3.6/lib/python3.6/copy.py", line 306, in _reconstruct
value = deepcopy(value, memo)
File "/usr/local/python3.6/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/local/python3.6/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/usr/local/python3.6/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/local/python3.6/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/local/python3.6/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/local/python3.6/lib/python3.6/copy.py", line 306, in _reconstruct
value = deepcopy(value, memo)
File "/usr/local/python3.6/lib/python3.6/copy.py", line 169, in deepcopy
rv = reductor(4)
File "/torch/venv3/pytorch/lib/python3.6/site-packages/torch/nn/quantized/modules/conv.py", line 151, in __getstate__
raise RuntimeError('torch.save() is not currently supported for quantized modules.'
RuntimeError: torch.save() is not currently supported for quantized modules. See https://github.com/pytorch/pytorch/issues/24045. Please use state_dict or torch.jit serialization.
热门帖子
精华帖子