DID-MDN icon indicating copy to clipboard operation
DID-MDN copied to clipboard

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

Open sararaza534 opened this issue 5 years ago • 7 comments

how to handle this issue?

sararaza534 avatar Apr 14 '19 10:04 sararaza534

this was removed in pytorch 1.0.

Megapotatosan avatar May 22 '19 06:05 Megapotatosan

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

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

GreenTeaHua avatar Aug 17 '19 03:08 GreenTeaHua

首先命令行运行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,请问您是没有遇到么,怎么解决的啊

Achhhe avatar Aug 18 '19 05:08 Achhhe

首先命令行运行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

texasmotorcycle avatar Oct 09 '19 07:10 texasmotorcycle

首先命令行运行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,请问您是没有遇到么,怎么解决的啊

请问你解决了吗?

diaodeyi avatar Dec 30 '20 15:12 diaodeyi

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

peylnog avatar Apr 14 '21 03:04 peylnog

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

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

kuretru avatar Aug 23 '21 08:08 kuretru