Skip to content

Instantly share code, notes, and snippets.

@AlbertoCasasOrtiz
Created June 12, 2020 07:06
Show Gist options
  • Save AlbertoCasasOrtiz/8a4efed10fbca68d95c0783c1bf90fae to your computer and use it in GitHub Desktop.
Save AlbertoCasasOrtiz/8a4efed10fbca68d95c0783c1bf90fae to your computer and use it in GitHub Desktop.
Change Google colab Tensorflow version
# It is necessary to restart the environment before changing version
# if you have already imported tensorflow.
# Change to version 1.x
%tensorflow_version 1.x
import tensorflow
print(tensorflow.__version__)
# Change to version 2.x
%tensorflow_version 2.x
import tensorflow
print(tensorflow.__version__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment