martinarjovsky / WassersteinGAN

BSD 3-Clause "New" or "Revised" License
3.2k stars 725 forks source link

module name can\'t contain "." #68

Open IlSLY opened 5 years ago

IlSLY commented 5 years ago

Traceback (most recent call last): File "main.py", line 112, in <module> netG = dcgan.DCGAN_G(opt.imageSize, nz, nc, ngf, ngpu, n_extra_layers) File "/home/mali/WassersteinGAN-master/models/dcgan.py", line 69, in __init__ nn.ConvTranspose2d(nz, cngf, 4, 1, 0, bias=False)) File "/home/mali/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 180, in add_module raise KeyError("module name can't contain \".\"") KeyError: 'module name can\'t contain "."' the version on my computer are: pytorch 1.0.0; torchvision 0.2.1. I guess it should be run in old version, could anyone tell me which version can run it?

whuCanon commented 5 years ago

you can just change all "." in arg. "name" of function "addmodule" to "" or other support character