-
Notifications
You must be signed in to change notification settings - Fork 277
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 dtype bug in image converter #2147
Conversation
Question though: is it okay to do image preprocessing in |
else: | ||
return np.expand_dims(value, broadcast_dims) | ||
return np.expand_dims(value, broadcast_dims).astype(inputs.dtype) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might to call standardize dtype here, looks like tf dtypes are causing issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's weird that the tests are not failing locally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This reverts commit e9241dd.
This reverts commit e9241dd.
This reverts commit e9241dd.
When we pass
bfloat16
as the dtype in image converter and call it, it fails. Here's a Colab to demonstrate this.Still curious why our preset tests for PaliGemma don't fail on GH Actions. Edit: Oh, it is because we don't run "large" tests: https://github.com/keras-team/keras-hub/blob/master/.github/workflows/actions.yml#L63.