Created
January 15, 2022 16:12
-
-
Save AdityaKane2001/4b78596a3cf74c560626d918cd3ae837 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def random_flip(self, image: tf.Tensor, target: tf.Tensor) -> tuple: | |
""" | |
Returns randomly flipped batch of images. Only horizontal flip | |
is available | |
Args: | |
image: Batch of images to perform random rotation on. | |
target: Target tensor. | |
Returns: | |
Augmented example with batch of images and targets with same dimensions. | |
""" | |
aug_images = tf.image.random_flip_left_right(image) | |
return aug_images, target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment