train.py 文件源码

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

项目:image-classification-tensorflow 作者: xuetsing 项目源码 文件源码
def should_distort_images(flip_left_right, random_crop, random_scale,
                          random_brightness):
    """
    Brief:
        Whether any distortions are enabled, from the input flags.
    Args:
        flip_left_right: Boolean whether to randomly mirror images horizontally.
        random_crop: Integer percentage setting the total margin used around the
        crop box.
        random_scale: Integer percentage of how much to vary the scale by.
        random_brightness: Integer range to randomly multiply the pixel values by.
    Returns:
        Boolean value indicating whether any distortions should be applied.
    """
    return (flip_left_right or (random_crop != 0) or (random_scale != 0) or
          (random_brightness != 0))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号