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 compatibility code for tensorflow 2.0 #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add compatibility code for tensorflow 2.0 #8

wants to merge 2 commits into from

Conversation

bobvo23
Copy link

@bobvo23 bobvo23 commented Oct 26, 2020

Colab and many people have moved to Tensorflow 2.0 environments, so I have added some compatibility code to run on TF2.
I have tested on Colab, tensorflow 2.3

The changes are quite simple, and they follow Google guidance:
Change all:
import tensorflow as tf
To:
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()

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.

1 participant