MUNIT icon indicating copy to clipboard operation
MUNIT copied to clipboard

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

Open EnricoBeltramo opened this issue 4 years ago • 2 comments

I use pytorch vers 1.1.0, that look haven't more the module torch.utils.serialization:

Traceback (most recent call last): File "test.py", line 6, in from utils import get_config, pytorch03_to_pytorch04 File "D:\Progetti\GAN cats\MUNIT\utils.py", line 5, in from torch.utils.serialization import load_lua ModuleNotFoundError: No module named 'torch.utils.serialization'

There is a workaround to use pytorch 1.1.0?

EnricoBeltramo avatar Dec 11 '19 22:12 EnricoBeltramo

do you use Docker ? there is Dockerfile which can help you to create correct env

sermakarevich avatar Dec 16 '19 07:12 sermakarevich

I uinstalled torchfile, imported it into utils.py then edited line 228 of that file to be vgglua = torchfile.load(os.path.join(model_dir, 'vgg16.t7'))

dvschultz avatar Dec 31 '19 09:12 dvschultz