LS
I’m trying to understand some code made by someone else.
One of the layers in the pytorch neural network is:
self.conv1 = torch.nn.Conv2d(4, 32, 8, 4)

In the code I notice that the input to this layer is
torch.Size([1, 4, 84, 84])
and the output of this layer is
torch.Size([1, 32, 20, 20])
I read the documentation of pytorch conv2d, but this confused me since there are only 3 positional arguments:
https://pytorch.org/docs/stable/generated/torch.nn.Conv2d.html 1
torch.nn.Conv2d(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros')

whereas in the code I have there are 4 positional arguments.
I’d like to understand how Conv2d(4, 32, 8, 4) transforms a torch.Size([1, 4, 84, 84]) to a torch.Size([1, 32, 20, 20])
Kind rgds