No module named '__torch__'
Traceback (most recent call last):
File "F:/project/shibie/insightface/detection/RetinaFace/rcnn/a_ghostnet.py", line 304, in <module>
state_dict= torch.load(a_path)
File "D:\Users\Administrator\miniconda3\lib\site-packages\torch\serialization.py", line 584, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "D:\Users\Administrator\miniconda3\lib\site-packages\torch\serialization.py", line 842, in _load
result = unpickler.load()
ModuleNotFoundError: No module named '__torch__'
解决方法:
model=torch.jit.load(spath[0], map_location=tnet.ctx)
model.eval()