def random_flip_left_right(image, seed=None):
uniform_random = random_ops.random_uniform([], 0, 1.0, seed=seed)
mirror = math_ops.less(tf.pack(
[1.0, 1.0, uniform_random, 1.0]), 0.5)
return tf.reverse(image, mirror)
评论列表
文章目录