Hi,
The following code is from PyTorch master documentation but I can not understand it; because I expect when we have an input with dimension [batch size, 1 , 3, 3], a filter tensor with dimension of [1, 1, 2, 2] should exist. As I think, F.conv2d would generate a tensor with dimension [batch_size, 1, 1, 1]. May I ask you to explain about the functionality of the following code and the way that I could see the real convolution like what I described with this code?
import torch
import torch.nn.functional as F
filters = torch.randn(8,2,2,2)
inputs = torch.randn(1,2,3,3)
a = F.conv2d(inputs, filters)
print(a.shape)
Thanks