Hello all ,i’m new to PyTorch can anyone please how do we choose the padding is there any formula or like what number should i decide for padding while making the architecture of CNN.
Below are the two examples of padding , in which 2 numbers have been taken into account but i don’t know how.
Thank u in advance.
self.conv1 = nn.Conv2d(in_channels, out_channels, kernel_size, stride=1, padding=0)

self.conv1 = nn.Conv2d(1, 16, 2, stride=2)