standardizer.py 文件源码

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

项目:tefla 作者: openAGI 项目源码 文件源码
def __call__(self, img, is_training):
        np.subtract(img, self.mean[:, np.newaxis, np.newaxis], out=img)
        np.divide(img, self.std[:, np.newaxis, np.newaxis], out=img)
        if is_training:
            img = self.augment_color(img, sigma=self.sigma)
        else:
            # tta (test time augmentation)
            img = self.augment_color(img, color_vec=self.color_vec)
        return img
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号