hardanger
hardanger

Reputation: 2627

How to set TensorFlow 2.0 as the default version in Google Collab

Within Google Collab, every time I load it up after restarting my computer, I have to run the following commands to uninstall the default, 1.15.0 version of TensorFlow and instead install 2.0.

How can 2.0 be set as the default so I don't have to keep doing this please?

This is the code that I currently have to load every time:

!pip uninstall tensorflow
!pip install tensorflow==2.0.0

Thanks a ton!

Upvotes: 3

Views: 1213

Answers (1)

jakevdp
jakevdp

Reputation: 86463

Edit, April 2020: tensorflow 2.x is now the default in Colab


Original answer:

See https://colab.research.google.com/notebooks/tensorflow_version.ipynb

At the top of your notebook run

%tensorflow_version 2.x

This will enable tensorflow 2.0 without needing to download and install it.

Upvotes: 6

Related Questions