naoto0804 / pytorch-AdaIN

Unofficial pytorch implementation of 'Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization' [Huang+, ICCV2017]
MIT License
1.08k stars 208 forks source link

convert torch to pytorch #20

Closed omar-araboghli closed 5 years ago

omar-araboghli commented 5 years ago

running the commands:

python torch_to_pytorch.py --model models/vgg_normalised.t7 python torch_to_pytorch.py --model models/decoder.t7

produces the following error: Traceback (most recent call last): File "torch_to_pytorch.py", line 9, in <module> from torch.utils.serialization import load_lua ModuleNotFoundError: No module named 'torch.utils.serialization'

Please refer to this issue: https://github.com/pytorch/pytorch/issues/14630

Hvitgar commented 5 years ago

This happens when you try to convert the models with a recent pyTorch version. For conversion (and only for conversion), pyTorch 0.4 is needed since torch-to-pytorch.py uses legacy code that has been removed past version 0.4.

naoto0804 commented 5 years ago

@Hvitgar Thank you for pointing out!

ArturoDeza commented 5 years ago

Reviving this thread. Is it possible for someone to provide a link for the converted model?

naoto0804 commented 5 years ago

I dit it. See #21.