码迷,mamicode.com
首页 > 其他好文 > 详细

Pytorch-nn.ConvTransposed2d()

时间:2018-12-10 14:17:52      阅读:449      评论:0      收藏:0      [点我收藏+]

标签:tran   注意   出图   stride   tor   ide   nbsp   pos   kernel   

  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

  

Pytorch-nn.ConvTransposed2d()

标签:tran   注意   出图   stride   tor   ide   nbsp   pos   kernel   

原文地址:https://www.cnblogs.com/leebxo/p/10095507.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!