【发布时间】:2016-12-25 18:08:42
【问题描述】:
在我的计算机上查找 TensorFlow 版本的命令是什么?我前段时间在我的电脑上安装了 TensorFlow,并想确保我拥有最新版本。
【问题讨论】:
标签: tensorflow
在我的计算机上查找 TensorFlow 版本的命令是什么?我前段时间在我的电脑上安装了 TensorFlow,并想确保我拥有最新版本。
【问题讨论】:
标签: tensorflow
import tensorflow as tf
tf.__version__
【讨论】:
pip list | grep tensorflow
您可以通过将“tensorflow”替换为库名称来查找任何已安装库的版本。
【讨论】:
$ pip show tensorflow
Name: tensorflow
Version: 1.5.0
Summary: TensorFlow helps the tensors flow
【讨论】:
使用以下代码在 jupyter-Notebook/Pycharm 中检查 tensorflow 版本。
import tensorflow as tf
print(tf.version.VERSION)
【讨论】:
$ source activate tensorflow
$ pip show tensorflow
Name: tensorflow
Version: 1.9.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: opensource@google.com
License: Apache 2.0
【讨论】:
你可以试试这个:
pip freeze|grep tensorflow
【讨论】:
$ import tensorflow as tf
$ tf.test.is_built_with_cuda()
True
$ tf.test.is_gpu_available(cuda_only=False, min_cuda_compute_capability=None)
False
【讨论】: