maxpool.py 文件源码

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

项目:pl-cnn 作者: oval-group 项目源码 文件源码
def mirror_activations(input, input_fixed, pool_size):

        out_fixed = my_pool_2d(input_fixed, ds=pool_size, ignore_border=True)
        mask = T.grad(cost=None,
                      wrt=input_fixed,
                      known_grads={out_fixed: T.ones_like(out_fixed)})

        masked_input = input * mask
        out = Cfg.floatX(pool_size[0] * pool_size[1]) * \
            pool_2d(masked_input, mode='average_exc_pad', ds=pool_size,
                    ignore_border=True)

        return out, out_fixed
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号