rgeirhos / Stylized-ImageNet

Code to create Stylized-ImageNet, a stylized version of standard ImageNet (ICLR 2019 Oral)
https://openreview.net/forum?id=Bygh9j09KX
MIT License
506 stars 63 forks source link

can not use torch.legacy for torch version==1.1.0 #5

Closed mingbocui closed 5 years ago

mingbocui commented 5 years ago

Thanks for your sharing. I run the code as you suggested in the readme file and found the torch.legacy (in file torch_to_pytorch.py )has been removed since version==0.4, but we are recommended to install torch with version==1.1.0. Could you check that? AND load_lua was also removed since version==0.5

rgeirhos commented 5 years ago

Thanks for pointing this out. You're recommending to change "torch==1.1.0" to "torch==0.4.0" in requirements.txt, is that correct / can you confirm this works as expected? The requirements were automatically generated with pipreqs, happy to change this line if necessary.

mingbocui commented 5 years ago

@rgeirhos thanks for your reply, I have tested for several trails and I would suggest that changing torch version to 0.4.1(version 0.4.0 did not work) and torchvision version to 0.2.2. Now the code could run correctly.

rgeirhos commented 5 years ago

Thanks @mingbocui for testing this. I have updated requirements.txt in commit 2d6ef2e.

iminfine commented 5 years ago

I think the requirements should be updated. You can just delete tqdm=4.32.2 ERROR: torchvision 0.2.2 has requirement tqdm==4.19.9, but you'll have tqdm 4.32.2 which is incompatible.

rgeirhos commented 5 years ago

Thanks @iminfine; I have updated requirements.txt in commit 0e9a244.

GA-17a commented 3 years ago

Hi @mingbocui @iminfine, did you meet the UserWarning "nn.UpsamplingNearest2d is deprecated. Use nn.functional.interpolate instead."? It seems that AdaIN style transfer model uses the old upsample algorithm. Now I can only get 224*224 images without fixing this warning. For val dataset, it's ok. But for train dataset, it's a little trouble.