TensorFlow image operations for batches

后端 未结 5 935
孤街浪徒
孤街浪徒 2020-12-08 08:35

There are a number of image operations in TensorFlow used for distorting input images during training, e.g. tf.image.random_flip_left_right(image, seed=None) an

5条回答
  •  抹茶落季
    2020-12-08 09:00

    You can call the image operation in a loop and concatenate the result. For example :

    transformed_images = []
    for i in range(batch_size):
      transformed_images.append(tf.image.random_flip_left_right(image[i, :, :, :]))
    retsult = tf.stack(transformed_images)
    

提交回复
热议问题