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

Fix the use of imagenet_utils.preprocess_input within a Lambda layer with mixed precision #14917

Merged
merged 1 commit into from
Jul 15, 2021
Merged

Fix the use of imagenet_utils.preprocess_input within a Lambda layer with mixed precision #14917

merged 1 commit into from
Jul 15, 2021

Conversation

anth2o
Copy link
Contributor

@anth2o anth2o commented Jul 13, 2021

I noticed an issue when using imagenet_utils.preprocess_input within a Lambda layer and using mixed precision. I described it and gave a minimal reproducible example here.

This PR is a very small bugfix, with the add of a unit test of the problematic behavior. If you remove the added line in imagenet_utils.py, the test test_preprocess_input_symbolic_mixed_precision in test mode torch will fail.

Copy link
Member

@fchollet fchollet left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@fchollet fchollet added kokoro:force-run ready to pull Ready to be merged into the codebase labels Jul 14, 2021
@copybara-service copybara-service bot merged commit 82fa47a into keras-team:master Jul 15, 2021
@anth2o anth2o deleted the fix-imagenet-preprocessing-within-lambda-layer-mixed-precision branch January 10, 2022 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes ready to pull Ready to be merged into the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants