Hey guys, I’m new at pytorch and cnn as well, so I dont know if I am being stupid. I’m getting this error:
RuntimeError: Given input size: (4 x 80 x 4). Calculated output size: (32 x 19 x 0). Output size is too small at /.../SpatialConvolutionMM.c:45
Here what I am doing in my code:
self.layer1 = nn.Sequential( nn.Conv2d(4, 32, kernel_size=8, stride=4), nn.BatchNorm2d(32), nn.ReLU())
self.layer2 = nn.Sequential( nn.Conv2d(32, 64, kernel_size=4, stride=2), nn.BatchNorm2d(64), nn.ReLU())
self.layer3 = nn.Sequential( nn.Conv2d(64, 64, kernel_size=3, stride=1), nn.BatchNorm2d(64), nn.ReLU())
And my input is a Tensor of shape [1 x 80 x 80 x 4]. What Am I doing wrong?