ModuleNotFoundError: No module named 'torch.utils.serialization'

二次信任 提交于 2021-01-27 21:55:33

问题


When I run a project used Pytorch I came up with this error:

Traceback (most recent call last):
File "train_drnet.py", line 10, in <module>
import utils
File "/home/muse/drnet-py/utils.py", line 18, in <module>
from data.kth import KTH 
File "/home/muse/drnet-py/data/kth.py", line 7, in <module>
from torch.utils.serialization import load_lua
ModuleNotFoundError: No module named 'torch.utils.serialization'

how to solve this,please?


回答1:


I think it was removed from Pytorch about a year ago, you can try tourch file instead - https://github.com/bshillingford/python-torchfile



来源:https://stackoverflow.com/questions/54107156/modulenotfounderror-no-module-named-torch-utils-serialization

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!