This following code below giving a output of shape (1,1,3) for the shape of xodd is (1,1,2). The given kernel shape is(112, 1, 1).
from torch.nn import functional as F
output = F.conv1d(xodd, kernel, padding=zeros)
How the padding=zeros works?
And also, How can I write an equivalent code in tensorflow so that the output is as same as the above output?
What is
padding=zeros? If we setpaddin=zeros, we don't need to add numbers at the right and the left of the tensor.Padding=0:
Padding=2:(We want to add two numbers at the right and the left of the tensor)
How can I write an equivalent code in tensorflow: