I was trying to implement the NVDIA’s paper on self-driving cars and had the following error
RuntimeError: Calculated padded input size per channel: (2 x 18). Kernel size: (3 x 3). Kernel size can’t be greater than actual input size
My conv_layer is as follows:
self.conv_layers = nn.Sequential(
nn.Conv2d(3, 24, 5, stride=2),
nn.ELU(),
nn.Conv2d(24, 36, 5, stride=2),
nn.ELU(),
nn.Conv2d(36, 48, 5, stride=2),
nn.ELU(),
nn.Conv2d(48, 64, 3, stride=2),
nn.ELU(),
nn.Conv2d(64, 64, 3, stride=2),
nn.MaxPool2d((1,3)),
nn.Dropout(0.5)
)
and the input.size() to this layer is torch.Size([32, 3, 70, 320]).
I am trying to understand how the the the size of ([32,3,70,320]) gets converted to a 3@66*220 input layer to it
Help me out