Pytorch conv_transpose2d是卷积运算还是互相关运算?

Pytorch conv_transpose2d是卷积运算还是互相关运算?,pytorch,torch,Pytorch,Torch,对于nn,我们提到它有一个互相关,然而,我的结果表明它有一个卷积算子 import torch import torch.nn.functional as F im = torch.Tensor([[0,1],[2,3]]).unsqueeze(0).unsqueeze(0) kernel = torch.Tensor([[0,1,2],[3,4,5], [6,7,8]]).unsqueeze(0).unsqueeze(0) op = F.conv_transpose2d(im, kernel

对于nn,我们提到它有一个互相关,然而,我的结果表明它有一个卷积算子

import torch
import torch.nn.functional as F
im = torch.Tensor([[0,1],[2,3]]).unsqueeze(0).unsqueeze(0)

kernel = torch.Tensor([[0,1,2],[3,4,5], [6,7,8]]).unsqueeze(0).unsqueeze(0)
op = F.conv_transpose2d(im, kernel, stride=2)
print(op)
它输出:

tensor([[[[ 0.,  0.,  0.,  1.,  2.],
          [ 0.,  0.,  3.,  4.,  5.],
          [ 0.,  2., 10., 10., 14.],
          [ 6.,  8., 19., 12., 15.],
          [12., 14., 34., 21., 24.]]]])
如果有卷积的话,结果会是这样的,我原以为相关结果是:

tensor([[[[ 0.,  0.,  8.,  7.,  6.],
          [ 0.,  0.,  5.,  4.,  3.],
          [16., 14., 38., 22., 18.],
          [10.,  8., 21., 12.,  9.],
          [ 4.,  2.,  6.,  3.,  0.]]]])
我误解了什么吗