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

Port RandomFlip layer to keras_core #510

Closed
wants to merge 1 commit into from
Closed

Port RandomFlip layer to keras_core #510

wants to merge 1 commit into from

Conversation

jamestran201
Copy link

Relates to keras-team/keras#18442

This PR attempts to port the Tensorflow implementation of RandomFlip to keras_core. I'm unsure about a few things, and will annotate the PR with some questions.

@google-cla
Copy link

google-cla bot commented Jul 17, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

flipped_outputs = inputs

if self.horizontal:
flipped_outputs = tf.image.stateless_random_flip_left_right(flipped_outputs, seed=[self.seed, 0])
Copy link
Author

Choose a reason for hiding this comment

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

Do we need an implementation of this function for each backend? If so, would the backend-specific files like backend/tensorflow/image.py be appropriate places to add them?

I wasn't able to find a way to use SeedGenerator here. Is this ok?

@fchollet
Copy link
Member

I suggest consolidation in #515 since it's better to move to backend-agnostic directly.

@fchollet fchollet closed this Jul 17, 2023
@jamestran201 jamestran201 deleted the port-random-flip branch July 17, 2023 20:57
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.

2 participants