hezhangsprinter / DCPDN

Densely Connected Pyramid Dehazing Network (CVPR'2018)
404 stars 112 forks source link

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

Closed ito1202 closed 6 years ago

ito1202 commented 6 years ago

I attempted to run python demo.py --dataroot ./facades/nat_new4 --valDataroot ./facades/nat_new4 --netG ./demo_model/netG_epoch_8.pth but error.

Error message is

Traceback (most recent call last): File "demo.py", line 128, in <module> netG = net.dehaze(inputChannelSize, outputChannelSize, ngf) File "/home/ito/src/DCPDN/dehaze22.py", line 537, in __init__ self.tran_est=G(input_nc=3,output_nc=3, nf=64) File "/home/ito/src/DCPDN/dehaze22.py", line 88, in __init__ layer2 = blockUNet(nf, nf*2, name, transposed=False, bn=True, relu=False, dropout=False) File "/home/ito/src/DCPDN/dehaze22.py", line 56, in blockUNet block.add_module('%s.leakyrelu' % name, nn.LeakyReLU(0.2, inplace=True)) File "/home/ito/virtualenv/pytorch/local/lib/python2.7/site-packages/torch/nn/modules/module.py", line 169, in add_module raise KeyError("module name can't contain \".\""). KeyError: 'module name can\'t contain "."'

My torch version is 0.4.0 , and torchvisiion version is 0.2.1.

I think, after version 0.2.1 '.'s are no longer allowed in module keys. Please tell me your torchvision version.

ito1202 commented 6 years ago

I'm sorry, I solved it. I install torch version 0.3.0 and torchvision version0.2.1.

warmachine102 commented 5 years ago

from where can i install torch version 0.3.0?