-
Notifications
You must be signed in to change notification settings - Fork 328
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 Keras 3 version check #2191
Merged
Merged
Conversation
This file contains 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
sampathweb
requested review from
mattdangerw and
fchollet
and removed request for
fchollet
November 26, 2023 22:53
mattdangerw
approved these changes
Nov 27, 2023
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!
sampathweb
added a commit
that referenced
this pull request
Dec 6, 2023
* Fix Keras 3 version check * Fix Keras 3 version check * Fix Keras 3 version check * Raise error if Keras is not compatible with TF
sampathweb
added a commit
that referenced
this pull request
Dec 6, 2023
* Fix Keras 3 version check (#2191) * Fix Keras 3 version check * Fix Keras 3 version check * Fix Keras 3 version check * Raise error if Keras is not compatible with TF * Fix bug when upranking passthrough inputs to RandAugment (#2194) - RandAugment sometimes will choose a "no augmentation" option and passthrough inputs unaltered. - Preprocessing normalization routines were not making copies of inputs and sometimes mutating layer input directly (mutating the input dict to cast dtypes and uprank tensors). - RandAugment under the passthrough option would return these inputs directly. The net effect was sometimes attempting to uprank during a passthrough call, breaking tf.map_fn * fix stable diffusion rank error (#2208) * Simplify running KerasCV with Keras 3 (#2179) * remove keras_core dependency * update init * update readme * fix model None error (#2176) (#2177) * Update pycoco_callback.py * Update waymo_evaluation_callback.py * fix model None error (#2176) (#2178) * Update pycoco_callback.py * Update waymo_evaluation_callback.py * update readme and conftest * update readme * update citation list * fix mix transformer tests * fix lint error * fix all failing tests * Fix dtype support for SegmentAnythingModel (#2207) * Fix dtype support for SAM * Update keras_cv/models/segmentation/segment_anything/sam_test.py * Fix Keras 2 failures * Fix F401 lint error; remove unused import * Version bump to r0.7.2.dev0 --------- Co-authored-by: Matt Watson <[email protected]> Co-authored-by: Divyashree Sreepathihalli <[email protected]> Co-authored-by: Tirth Patel <[email protected]>
yuvraj-wale
pushed a commit
to yuvraj-wale/keras-cv
that referenced
this pull request
Feb 8, 2024
* Fix Keras 3 version check * Fix Keras 3 version check * Fix Keras 3 version check * Raise error if Keras is not compatible with TF
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
from tensorflow import keras
doesn't work forTF 2.14
and Keras 3.keras-nlp
has a function to check if TensorFlow uses Keras 3 via -https://github.com/keras-team/keras-nlp/blob/master/keras_nlp/backend/config.py#L66
This works when using
tf-nightly
orTensorFlow 2.15
, but breaks onTensorFlow 2.14
which is the default in Colab. To fix it, useimport keras
instead offrom tensorflow import keras
when doing this check.Colab to repro the issue:
https://colab.research.google.com/drive/17AwBX5S29d-hjUDPLN8roHSNzrjXricG?usp=sharing