normalize.py 文件源码

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

项目:chainercv 作者: chainer 项目源码 文件源码
def __call__(self, x):
        """Normalize input and scale it.

        Args:
            x (chainer.Variable): A variable holding 4-dimensional array.
                Its :obj:`dtype` is :obj:`numpy.float32`.

        Returns:
            chainer.Variable:
            The shape and :obj:`dtype` are same as those of input.
        """

        x = F.normalize(x, eps=self.eps, axis=1)
        scale = F.broadcast_to(self.scale[:, np.newaxis, np.newaxis], x.shape)
        return x * scale
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号