cifar10.py 文件源码

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

项目:cifar10-tensorflow 作者: persistforever 项目源码 文件源码
def data_augmentation(self, images, mode='train', flip=False, 
                          crop=False, crop_shape=(24,24,3), whiten=False, 
                          noise=False, noise_mean=0, noise_std=0.01):
        # ????
        if crop:
            if mode == 'train':
                images = self._image_crop(images, shape=crop_shape)
            elif mode == 'test':
                images = self._image_crop_test(images, shape=crop_shape)
        # ????
        if flip:
            images = self._image_flip(images)
        # ????
        if whiten:
            images = self._image_whitening(images)
        # ????
        if noise:
            images = self._image_noise(images, mean=noise_mean, std=noise_std)

        return images
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号