Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate channel_shuffle to use BaseImageAugmentationLayer #218

Merged

Conversation

quantumalaviya
Copy link
Contributor

closes #187

width = tf.shape(images)[2]
num_channels = images.shape[3]
def augment_image(self, image, transformation=None):
height = tf.shape(image)[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reduce this to a single tf.shape call.

height, width, num_channels = tf.shape(image)

or

shape = tf.shape(image)
height, width, num_channels = shape[0], shape[1], shape[2]

@LukeWood
Copy link
Contributor

Thanks for the great PR. Few minor comments. @quantumalaviya

@LukeWood
Copy link
Contributor

LukeWood commented Apr 1, 2022

Thanks @quantumalaviya

@LukeWood LukeWood merged commit abea5cc into keras-team:master Apr 1, 2022
@quantumalaviya quantumalaviya deleted the channel_shuffle_to_baseimgaug branch May 2, 2022 11:05
@bhack bhack mentioned this pull request May 15, 2022
ianstenbit pushed a commit to ianstenbit/keras-cv that referenced this pull request Aug 6, 2022
…#218)

* Migrate channel_shuffle to use BaseImageAugmentationLayer

* Migrate channel_shuffle to use BaseImageAugmentationLayer

* width and height use one tf.shape call
adhadse pushed a commit to adhadse/keras-cv that referenced this pull request Sep 17, 2022
…#218)

* Migrate channel_shuffle to use BaseImageAugmentationLayer

* Migrate channel_shuffle to use BaseImageAugmentationLayer

* width and height use one tf.shape call
freedomtan pushed a commit to freedomtan/keras-cv that referenced this pull request Jul 20, 2023
* Add scatter_update and block_update

* Add docstring

* remove explicit conversion

* Fix docstring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate channel_shuffle.py to use BaseImageAugmentationLayer
4 participants