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.
SpatialFractionalMaxPooling.py 文件源码
python
阅读 33
收藏 0
点赞 0
评论 0
评论列表
文章目录