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

Add support for TF 2.6 #331

Merged
merged 3 commits into from
Jul 13, 2021
Merged

Add support for TF 2.6 #331

merged 3 commits into from
Jul 13, 2021

Conversation

lgeiger
Copy link
Member

@lgeiger lgeiger commented Jul 5, 2021

No description provided.

@lgeiger lgeiger requested a review from a team July 5, 2021 12:10
@lgeiger
Copy link
Member Author

lgeiger commented Jul 5, 2021

This fix is a bit subtle since TF switched to keras-team/keras over tensorflow/python/keras. However, the old code still exists. Checkout tensorflow/tensorflow#50613 for more information.

from tensorflow.python.keras.backend import is_keras_tensor

if tf.__version__[0] > "1":
is_keras_tensor = tf.keras.backend.is_keras_tensor
Copy link
Member Author

Choose a reason for hiding this comment

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

We can't use from tensorflow.backend.keras import is_keras_tensor here due to google/pytype#960

It is also important that we are not relying on tensorflow.python.keras import as if would break the check in TF 2.6 (see tensorflow/tensorflow#50613)

@lgeiger lgeiger merged commit b0870da into main Jul 13, 2021
@lgeiger lgeiger deleted the tf-26 branch July 13, 2021 09:12
@lgeiger lgeiger added feature New feature or request and removed internal-improvement labels Jul 13, 2021
@lgeiger lgeiger changed the title Add TF 2.6.0rc0 to CI Add support for TF 2.6 Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants