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
I avoided this by simply making 'KeyError("module name can't contain "."")' an annotation in torch.nn.modules.module. This semantic requirement of pytorch seems meaningless.
!python demo.py --dataroot ./facades/nat_new4 --valDataroot ./facades/nat_new4 --netG ./models/netG_epoch_8.pth %time
ERROR
Namespace(annealEvery=400, annealStart=0, batchSize=1, beta1=0.5, dataroot='./facades/nat_new4', dataset='pix2pix', display=5, evalIter=500, exp='sample', imageSize=1024, inputChannelSize=3, lambdaGAN=0.01, lambdaIMG=1, lrD=0.0002, lrG=0.0002, mode='B2A', ndf=64, netD='', netG='./models/netG_epoch_8.pth', ngf=64, niter=400, originalSize=1024, outputChannelSize=3, poolSize=50, valBatchSize=1, valDataroot='./facades/nat_new4', wd=0.0, workers=1)
Random Seed: 6918
/usr/local/lib/python3.6/dist-packages/torchvision/transforms/transforms.py:211: UserWarning: The use of the transforms.Scale transform is deprecated, please use transforms.Resize instead.
"please use transforms.Resize instead.")
Traceback (most recent call last):
File "demo.py", line 128, in
netG = net.dehaze(inputChannelSize, outputChannelSize, ngf)
File "/content/drive/My Drive/DCPDN-master/dehaze22.py", line 537, in init
self.tran_est=G(input_nc=3,output_nc=3, nf=64)
File "/content/drive/My Drive/DCPDN-master/dehaze22.py", line 88, in init
layer2 = blockUNet(nf, nf*2, name, transposed=False, bn=True, relu=False, dropout=False)
File "/content/drive/My Drive/DCPDN-master/dehaze22.py", line 56, in blockUNet
block.add_module('%s.leakyrelu' % name, nn.LeakyReLU(0.2, inplace=True))
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 196, in add_module
raise KeyError("module name can't contain "."")
KeyError: 'module name can't contain "."'
CPU times: user 3 µs, sys: 1 µs, total: 4 µs
Wall time: 5.72 µs
The text was updated successfully, but these errors were encountered: