Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sararaza534 opened this issue Apr 14, 2019 · 7 comments
Open

Comments

@sararaza534
Copy link

how to handle this issue?

@Megapotatosan
Copy link

this was removed in pytorch 1.0.

@GreenTeaHua
Copy link

首先命令行运行pip install torchfile安装torchfile,

from torch.utils.serialization import load_lua --》import torchfile,

@Achhhe
Copy link

Achhhe commented Aug 18, 2019

首先命令行运行pip install torchfile安装torchfile,

from torch.utils.serialization import load_lua --》import torchfile,

您好,我按照您说的,pip install torchfile,然后将from torch.utils.serialization import load_lua替换为import torchfile,然后将代码中load_lua改为torchfile.load,最后还是遇到了错误,TypeError:‘NoneType’ object is not callable,请问您是没有遇到么,怎么解决的啊

@texasmotorcycle
Copy link

首先命令行运行pip install torchfile安装torchfile,
from torch.utils.serialization import load_lua --》import torchfile,

您好,我按照您说的,pip install torchfile,然后将from torch.utils.serialization import load_lua替换为import torchfile,然后将代码中load_lua改为torchfile.load,最后还是遇到了错误,TypeError:‘NoneType’ object is not callable,请问您是没有遇到么,怎么解决的啊

你可以登陆这个网站看一下https://blog.csdn.net/kent_xyli/article/details/89187558

@diaodeyi
Copy link

首先命令行运行pip install torchfile安装torchfile,
from torch.utils.serialization import load_lua --》import torchfile,

您好,我按照您说的,pip install torchfile,然后将from torch.utils.serialization import load_lua替换为import torchfile,然后将代码中load_lua改为torchfile.load,最后还是遇到了错误,TypeError:‘NoneType’ object is not callable,请问您是没有遇到么,怎么解决的啊

请问你解决了吗?

@peylnog
Copy link

peylnog commented Apr 14, 2021

修改完了torchfile 还是有错误 
struct.error: unpack requires a buffer of 4 bytes
有人解决了吗?
thanks a lot

@kuretru
Copy link

kuretru commented Aug 23, 2021

修改完了torchfile 还是有错误 
struct.error: unpack requires a buffer of 4 bytes
有人解决了吗?
thanks a lot

这个是你模型没下好,重新下一下就好了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants