ConvTranspose3d#
- class ConvTranspose3d(in_channels, out_channels, kernel_size, stride=1, padding=0, output_padding=0, dilation=1, groups=1, bias=True)[源代码]#
在一个input tensor上使用3D转置卷积。
只支持 groups = 1 且 conv_mode = “cross_correlation” 的情况.
ConvTranspose3d
可以被视为Conv3d
operation 相对于input的梯度。Convolution3D 通常会减小输入的大小,而transposed convolution3d 的工作方式相反,将较小的输入转换为较大的输出,同时保留连接模式。
- 参数:
in_channels (
int
) – 输入数据中的通道数。out_channels (
int
) – 输出数据中的通道数。kernel_size (
Union
[int
,Tuple
[int
,int
,int
]]) – 空间维度上的权重大小。如果kernel_size 是一个int
, 实际的kernel大小为(kernel_size, kernel_size, kernel_size)
。stride (
Union
[int
,Tuple
[int
,int
,int
]]) – stride of the 3D convolution operation. Default: 1padding (
Union
[int
,Tuple
[int
,int
,int
]]) – size of the paddings added to the input on all sides of its spatial dimensions. Only zero-padding is supported. Default: 0output_padding (
Union
[int
,Tuple
[int
,int
,int
]]) – size of paddings appended to output. Default: 0dilation (
Union
[int
,Tuple
[int
,int
,int
]]) – dilation of the 3D convolution operation. Default: 1groups (
int
) – number of groups into which the input and output channels are divided, so as to perform agrouped convolution
. Whengroups
is not 1,in_channels
andout_channels
must be divisible by groups, and the shape of weight should be(groups, in_channels // groups, out_channels // groups, depth, height, width)
. Default: 1bias (
bool
) – wether to add a bias onto the result of convolution. Default: True
备注
weight
的shape通常是(in_channels, out_channels, depth, height, width)
.bias
的shape通常是(1, out_channels, *1)