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

Support TF_USE_LEGACY_KERAS #1295

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

mattdangerw
Copy link
Member

@mattdangerw mattdangerw commented Nov 6, 2023

Colab testing out all our cases -> https://colab.research.google.com/gist/mattdangerw/43aba025b2587fe132a7f696f6630664/keras-3-detection.ipynb

This covers the case where tensorflow has been configured with TF_USE_LEGACY_KERAS=True. In this case, we will also load the legacy version of Keras.

@mattdangerw mattdangerw force-pushed the keras-3-detection branch 5 times, most recently from 31aafd4 to 628c082 Compare November 6, 2023 21:42
@mattdangerw mattdangerw requested a review from fchollet November 6, 2023 21:51
@divyashreepathihalli
Copy link
Collaborator

divyashreepathihalli commented Nov 6, 2023

@mattdangerw may be this function

def keras_3():
    """Check if Keras 3 is installed."""
    return _IS_KERAS_3

also would need to check if keras 3 is installed without tensorflow

@mattdangerw
Copy link
Member Author

/gcbrun

@mattdangerw mattdangerw changed the title Improve Keras 3 detection Support TF_USE_LEGACY_KERAS Nov 6, 2023
This covers the case where tensorflow has been configured with
TF_USE_LEGACY_KERAS=True.

In this case, we will also load the legacy version of Keras (we just
follow the `tf.keras` version, whatever it is).
@mattdangerw
Copy link
Member Author

/gcbrun

@mattdangerw
Copy link
Member Author

Got a verbal lgtm from @fchollet right now, so will pull this in.

@mattdangerw mattdangerw merged commit e7bbf2b into keras-team:master Nov 6, 2023
9 checks passed
mattdangerw added a commit to mattdangerw/keras-hub that referenced this pull request Nov 6, 2023
This covers the case where tensorflow has been configured with
TF_USE_LEGACY_KERAS=True.

In this case, we will also load the legacy version of Keras (we just
follow the `tf.keras` version, whatever it is).
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