SpatialFractionalMaxPooling.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:pytorch-dist 作者: apaszke 项目源码 文件源码
def _getOutputSizes(self, input):
        outW = self.outW
        outH = self.outH
        if self.ratioW != None and self.ratioH != None:
            assert input.ndimension() == 4
            outW = int(math.floor(input.size(3) * self.ratioW))
            outH = int(math.floor(input.size(2) * self.ratioH))

            # Neither can be smaller than 1
            assert outW > 0
            assert outH > 0
        else:
            assert outW != None and outH != None

        return outW, outH

    # Call this to turn off regeneration of random pooling regions each
    # updateOutput call.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号