1. There is a problem
ModuleNotFoundError: No module named 'torch.utils.serialization'
2. Analyze the reasons
it may be that the version of Python is too new to cause
3. Solutions
1. Install the older version of Python 2
2. Replace with a new version of function: torchfile 2
(1) install torchfile
pip install torchfile
(2)from torch.utils.serialization import load_lua to import torchfile
(3)load_lua to torchfile.load
Similar Posts:
- After installing torch on Linux, an error is still reported: importerror: no module named torch
- PytorchStreamReader failed reading zip archive: failed finding central directory
- [Solved] pytorchImportError: numpy.core.multiarray failed to import
- [Solved] DCNv2 Compile Error: error: identifier “THCudaBlas_SgemmBatched” is undefined
- Examples of torch.NN.Functional.Relu() and torch.NN.Relu()
- Error in import torch under linux environment
- Error in loading pre training weight in torch. Load() in pytorch
- Solutions to errors encountered by Python
- [Solved] Python3 Error: ModuleNotFoundError: No module named ‘_bz2’
- PyTorch UserWarning: volatile was removed and now has no effect. Use `with torch.no_grad():` inst