@inkplay @ptab
Thanks for your answer, but that is not how i want to use the conv2d.
I want to use conv2d like this:
import torch
import torch.nn.functional as F
K =  torch.Tensor([[1 ,0, -1],[2, 0 ,-2], [1, 0 ,-1]])
Input = torch.rand(4,3,10,10) 


output = F.conv2d(Input,K,padding=(1, 1))
output.size() # expected to be 4x3x10x10