Pytorch-nn.ConvTransposed2d()

  ConvTransposed2d()其实是Conv2d()的逆过程,其参数是一样

  Conv2d():

    output = (input+2*Padding-kernelSize) / stride + 1(暂时不考虑outputPadding 注意:outputPadding只是在一边Padding)

    =>input  = (output-1) * stride - 2*Padding + kernelSize

    例如输入图片尺寸为128,inputPadding为0,kernelSize为4,stride为2,outputPadding为1,那么输出图片尺寸为64

  同理可得

  ConvTransposed2d():

    output = (input-1) * stride - 2*Padding + kernelSize

  

posted @ 2018-12-10 11:34  Le1B_o  阅读(2182)  评论(0编辑  收藏  举报