How to downgrade to tensorflow-gpu version 1.12 in google colab

我的梦境 提交于 2020-07-09 03:56:18

问题


I am running a GAN which is compatible only with a older version of tensorflow GPU so I need to downgrade tensorflow gpu from 1.15 in google colab to 1.12. I tried using following commands which has been suggested in this thread.

%tensorflow_version 1.x
import tensorflow as tf
print(tf.__version__)

!nvcc --version

After the magic and the version check (which I get tensorflow version == 1.15.2 for now) I install below. After installation of tensorflow ==1.12.2 I restart the runtime as they suggest(I tried otherwise too) and install cuda and restart the runtime again(tried otherwise here also).

!pip install tensorflow-gpu==1.12.2

!wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb
!dpkg -i cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb
!apt-key add /var/cuda-repo-9-0-local/7fa2af80.pub
!apt-get update
!apt-get install cuda=9.0.176-1

This way has worked even up untill 2019 but it is not working for me now. I need a solution with using pip or without using pip.

I tried below code as well to uninstall the current version and installed 1.12 but it did not work. And I know that the colab does not recommend installing tensorflow using pip.

!pip uninstall tensorflow-gpu -y

来源:https://stackoverflow.com/questions/62357382/how-to-downgrade-to-tensorflow-gpu-version-1-12-in-google-colab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!