COLAB objecting to tensorflow version 1.x - unable to run week 1 colab examples

ValueError: Tensorflow 1 is unsupported in Colab.

Your notebook should be updated to use Tensorflow 2.
See the guide at الانتقال إلى TensorFlow 2  |  TensorFlow Core.

Can anyone help with this?

Hi @John_Norrington,
Did you accidentally post this under the wrong course? The GANS course uses pytorch, not Tensorflow, so it shouldn’t be trying to load Tensorflow at all for any of its labs.

The topic Input to a pre-trained GAN uses tensorflow. I have attached a screenshot.
The lab wants this co-lab notebook to run Google Colab

here is a screenshot of the build basic GAN week 1 page:

So while the lab (Which I have done) uses pytorch the colab examples demonstrating GANs don’t work.

Many thanks
John

Oh!! I overlooked that! :woman_facepalming:
Thank you! I’ll report this to the developers so they can update it

1 Like

Hi everyone! I just run into the same problem while executing the notebook. A quick fix that worked for me is to use !pip install tensorflow-gpu==1.15.2 instead of %tensorflow_version 1.x @John_Norrington

6 Likes

@AngelosMar Thank you very much for this workaround. It worked like a charm :slight_smile:

2 Likes

Thank you and them, so we’re waiting for.

It worked for me beautifully, too. Thanks a lot!

1 Like

Where to write this command: !pip install tensorflow-gpu==1.15.2 in the given styleGAN notebook?

@Sampada_Tavse,
You can put it instead of %tensorflow_version 1.x, in the same place

Yes, thank you Wendy and AngelosMar, it worked, and I got the feel of StyleGAN.

1 Like