VITA-Group / AutoGAN

[ICCV 2019] "AutoGAN: Neural Architecture Search for Generative Adversarial Networks" by Xinyu Gong, Shiyu Chang, Yifan Jiang and Zhangyang Wang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trouble with training discovered GANs

VinulaUthsara opened this issue · comments

I am using Google Colab to train a GAN (after executing search) or the GAN searched in the research paper according to the instructions mentioned in the 'README.md' but the following error keeps happening.

Screenshot (5)

Traceback (most recent call last):
File "train.py", line 167, in
main()
File "train.py", line 138, in main
inception_score, fid_score = validate(args, fixed_z, fid_stat, gen_net, writer_dict)
File "/content/AutoGAN/functions.py", line 279, in validate
img_grid = make_grid(sample_imgs, nrow=5, normalize=True, scale_each=True)
File "/usr/local/lib/python3.6/dist-packages/torchvision/utils.py", line 75, in make_grid
norm_range(t, range)
File "/usr/local/lib/python3.6/dist-packages/torchvision/utils.py", line 71, in norm_range
norm_ip(t, float(t.min()), float(t.max()))
File "/usr/local/lib/python3.6/dist-packages/torchvision/utils.py", line 64, in norm_ip
img.clamp_(min=min, max=max)
RuntimeError: Output 0 of UnbindBackward is a view and is being modified inplace. This view is the output of a function that returns multiple views. Such functions do not allow the output views to be modified inplace. You should replace the inplace operation by an out-of-place one.

May I know your torch version?

You can unblock yourself temporarily by replacing writer_dict with None at this line.

inception_score, fid_score = validate(args, fixed_z, fid_stat, gen_net, writer_dict)

Torch version on Google Colab is : 1.7.0+cu101

Can u try to use pytorch 1.1.0 instead?