Theano.py 文件源码

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

项目:NNBuilder 作者: aeloyq 项目源码 文件源码
def pool(self, input, window, mode, stride, pad, autopad):
            if mode == 'max':
                mode = 'max'
            elif mode == 'sum':
                mode = 'sum'
            elif mode == 'avg':
                mode = 'average_exc_pad'
            elif mode == 'avgpad':
                mode = 'average_inc_pad'
            else:
                mode = 'sum'
            if input.ndim == 4:
                return P.pool_2d(input=input, ws=window, ignore_border=not autopad, stride=stride, pad=pad, mode=mode)
            elif input.ndim == 5:
                return P.pool_3d(input=input, ws=window, ignore_border=not autopad, stride=stride, pad=pad, mode=mode)
            else:
                basic.defaultreturn()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号