nv-tlabs / GSCNN

Gated-Shape CNN for Semantic Segmentation (ICCV 2019)
https://nv-tlabs.github.io/GSCNN/
Other
915 stars 200 forks source link

ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 256, 1, 1]) #40

Closed renmmmmmm closed 4 years ago

renmmmmmm commented 4 years ago

ValueError: Caught ValueError in replica 0 on device 0. Original Traceback (most recent call last): File "/home/renshasha/anaconda3/envs/aaa/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 60, in _worker output = module(*input, kwargs) File "/home/renshasha/anaconda3/envs/aaa/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in call result = self.forward(*input, *kwargs) File "/home/renshasha/GSCNN-master/network/gscnn.py", line 315, in forward x = self.aspp(m7, acts) File "/home/renshasha/anaconda3/envs/aaa/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in call result = self.forward(input, kwargs) File "/home/renshasha/GSCNN-master/network/gscnn.py", line 167, in forward img_features = self.img_conv(img_features) File "/home/renshasha/anaconda3/envs/aaa/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in call result = self.forward(*input, *kwargs) File "/home/renshasha/anaconda3/envs/aaa/lib/python3.7/site-packages/torch/nn/modules/container.py", line 92, in forward input = module(input) File "/home/renshasha/anaconda3/envs/aaa/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in call result = self.forward(input, **kwargs) File "/home/renshasha/anaconda3/envs/aaa/lib/python3.7/site-packages/torch/nn/modules/batchnorm.py", line 81, in forward exponential_average_factor, self.eps) File "/home/renshasha/anaconda3/envs/aaa/lib/python3.7/site-packages/torch/nn/functional.py", line 1652, in batch_norm raise ValueError('Expected more than 1 value per channel when training, got input size {}'.format(size)) ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 256, 1, 1])

renmmmmmm commented 4 years ago

wide_resnet = wider_resnet38_a2(classes=1000, dilation=True)

zarabozdag commented 4 years ago

Do you solve this problem, I got the same error @renmmmmmm

tovacinni commented 4 years ago

Please refer to here: https://github.com/nv-tlabs/GSCNN/issues/28#issue-504947531