You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the error message, it looks like module name can't contain ".".
replace strings like "initial.{0}-{1}.convt" to "initial-{0}-{1}-convt"
and 'initial.{0}.relu' to 'initial-{0}-relu'
might solve the issue.
Hi, @tjwei when I execute the wgan2-AC-lasagne.ipynb in your repository, the following error appears:
KeyError Traceback (most recent call last)
in
----> 1 netG = DCGAN_G_nobn(imageSize, nz, nc, ngf, 1, n_extra_layers)
2 netG.apply(weights_init)
in init(self, isize, nz, nc, ngf, ngpu, n_extra_layers)
59 main = nn.Sequential()
60 main.add_module('initial.{0}-{1}.convt'.format(nz, cngf),
---> 61 nn.ConvTranspose2d(nz, cngf, 4, 1, 0, bias=False))
62 main.add_module('initial.{0}.relu'.format(cngf),
63 nn.ReLU(True))
/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py in add_module(self, name, module)
184 raise KeyError("attribute '{}' already exists".format(name))
185 elif '.' in name:
--> 186 raise KeyError("module name can't contain "."")
187 elif name == '':
188 raise KeyError("module name can't be empty string """)
KeyError: 'module name can't contain "."'
How can I solve this problom? Thanks a lot.
The text was updated successfully, but these errors were encountered: