簡體   English   中英

TensorFlow 2 未在 colab google 和 windows 10 中顯示版本

[英]TensorFlow 2 not show the version in colab google and windows 10

我在 google colab 中安裝了 TensorFlow 版本 2:

!wget https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64 -O cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64.deb !dpkg -i cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64.deb !apt-key add /var/cuda-repo-10-0-local-10.0.130-410.48/7fa2af80.pub !apt-get update !apt-get install cuda !pip install tf-nightly-gpu-2.0-preview

但是當我試圖找到它顯示的版本時

1.13.0-dev20190116

當我想使用 tf.enable_eager_execution() 和 NameError: name 'layers' is not defined 時也有錯誤

像這樣嘗試:

!pip install tf-nightly-2.0-preview
import tensorflow as tf

正如Luca解釋的檢查您需要的版本:

print(tf.__version__)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM