Error when running in google colab
Closed this issue · 0 comments
haritsahm commented
!python train.py experiment=camvid trainer.max_epochs=100 datamodule.batch_size=4 logger=neptune
File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/strategies/strategy.py", line 358, in training_step
return self.model.training_step(*args, **kwargs)
File "/content/pytorch-DMANet/src/models/dmanet_module.py", line 82, in training_step
images, logits, gt_masks = self.step(batch)
File "/content/pytorch-DMANet/src/models/dmanet_module.py", line 78, in step
logits = self.forward(images)
File "/content/pytorch-DMANet/src/models/dmanet_module.py", line 74, in forward
return self._net(x)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/content/pytorch-DMANet/src/models/components/dma_net.py", line 156, in forward
dec_masks = self._decoder(enc_features)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/content/pytorch-DMANet/src/models/components/dma_net.py", line 83, in forward
gcb_features = self._gcb(c5)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/container.py", line 139, in forward
input = module(input)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/content/pytorch-DMANet/src/models/functions/layers.py", line 179, in forward
x = self._bn(x)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/batchnorm.py", line 179, in forward
self.eps,
File "/usr/local/lib/python3.7/dist-packages/torch/nn/functional.py", line 2436, in batch_norm
_verify_batch_size(input.size())
File "/usr/local/lib/python3.7/dist-packages/torch/nn/functional.py", line 2404, in _verify_batch_size
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])