添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
咆哮的木瓜  ·  sigtimedwait·  1 月前    · 
卖萌的牛肉面  ·  新言新语 - ...·  2 月前    · 

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I'm running the srgan.py implementation and receive the following error:

Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='img_align_celeba', decay_epoch=100, epoch=0, hr_height=256, hr_width=256, lr=0.0002, n_cpu=8, n_epochs=200, sample_interval=100)
Downloading: "https://download.pytorch.org/models/vgg19-dcbb9e9d.pth" to /Users/Username/.torch/models/vgg19-dcbb9e9d.pth
100%|███████████████████████████████████████████| 574673361/574673361 [00:34<00:00, 16895858.86it/s]
Traceback (most recent call last):
  File "srgan.py", line 104, in <module>
    lr_transforms = [   transforms.Resize((opt.hr_height//4, opt.hr_height//4), Image.BICUBIC),
AttributeError: module 'torchvision.transforms' has no attribute 'Resize'

If you need any additional information let me know...

I was having the error: "AttributeError: 'module' object has no attribute 'Resize' ". I installed torchvision-0.2.0-py2.py3-none-any.whl from the wheel file available at https://download.pytorch.org/whl/cu90/torch_stable.html and it solved my problem. I was previously using torchvision==0.1.6 when the error occured.