pytorch-siggraph2017-inpainting icon indicating copy to clipboard operation
pytorch-siggraph2017-inpainting copied to clipboard

ModuleNotFoundError: No module named 'torch.legacy'

Open msacar opened this issue 6 years ago • 3 comments

i cloned repo install requirements then
python inpaint.py --input example.png --mask example_mask.png

Traceback (most recent call last): File "inpaint.py", line 4, in from torch.legacy import nn ModuleNotFoundError: No module named 'torch.legacy'

msacar avatar Dec 09 '18 14:12 msacar

torch.legacy has removed from pytorch1.0, you should run it in pytorch0.4

piaozhx avatar Dec 29 '18 04:12 piaozhx

torch.legacy has removed from pytorch1.0, you should run it in pytorch0.4

I have a question that if I run it in pytorch0.4, what version of torchvision do i need

fredericktutu avatar Sep 08 '19 08:09 fredericktutu

There is a workaround, there is a new function in current pytorch CrossMapLRN2d which is doing the same thing.

So you can import this function by from torch.nn.modules import CrossMapLRN2d instead of SpatialCrossMapLRNOld

Animadversio avatar Sep 16 '19 00:09 Animadversio