neural_net.py 文件源码

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

项目:Hyperopt-Keras-CNN-CIFAR-100 作者: guillaume-chevalier 项目源码 文件源码
def random_image_mirror_left_right(input_layer):
    """
    Flip each image left-right like in a mirror, randomly, even at test-time.

    This acts as a data augmentation technique. See:
    https://stackoverflow.com/questions/39574999/tensorflow-tf-image-functions-on-an-image-batch
    """
    return keras.layers.core.Lambda(function=lambda batch_imgs: tf.map_fn(
        lambda img: tf.image.random_flip_left_right(img), batch_imgs
    )
    )(input_layer)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号