class ConvTranspose2d(_ConvTransposeMixin, _ConvNd): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, output_padding=0, groups=1, bias=True, dilation=1, padding_mode=‘zeros‘):
int
) – 输入信号的通道数int
) – 卷积产生的通道数int
or tuple
) - 卷积核的大小int
or tuple
,optional
) - 卷积步长int
or tuple
, optional
) - 输入的每一条边补充0的层数int
or tuple
, optional
) - 输出的每一条边补充0的层数int
or tuple
, optional
) – 卷积核元素之间的间距int
, optional
) – 从输入通道到输出通道的阻塞连接数bool
, optional
) - 如果bias=True
,添加偏置
h_in = 128*128
h_out = 56*56
这里h_in指正向卷积输入
+1是因为除不尽向下取整
output_padding,是因为输出与期望输出有偏差,需在下边补0填充
pytorch转置卷积(反卷积)参数说明,尺寸输入输出的计算
原文:https://www.cnblogs.com/ywheunji/p/12425910.html