retrain.py 文件源码

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

项目:tensorflow-prebuilt-classifier 作者: recursionbane 项目源码 文件源码
def should_distort_images(flip_left_right, random_crop, random_scale,
                          random_brightness):
  """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))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号