Closed s0u5j1i9n closed 3 years ago
Probably because of the Pytorch version. Please use Pytorch v1.1.0.
Based on https://discuss.pytorch.org/t/unable-to-import-weak-module/60289/6, I believe that those annotations can be removed without any negative effect when using a current torch version.
"The decorators its pulling from _jit_internal were deleted in v1.2. Their functionality is now automatic, so they can just be deleted and everything should work the same."
I got an error code ImportError: cannot import name 'weak_script_method'. As below "quantization_cpu_np_infer" has any problem... Could you give me any advices?
Traceback (most recent call last): File "DNN_NeuroSim_V1.3/Inference_pytorch/inference.py", line 14, in
from utee import hook
File "/home/ubuntu/DNN_NeuroSim_V1.3/Inference_pytorch/utee/hook.py", line 5, in
from modules.quantization_cpu_np_infer import QConv2d,QLinear
File "/home/ubuntu/DNN_NeuroSim_V1.3/Inference_pytorch/modules/quantization_cpu_np_infer.py", line 5, in
from torch._jit_internal import weak_script_method
ImportError: cannot import name 'weak_script_method'