我需要找到我安装了哪个版本的TensorFlow。我使用的是Ubuntu 16.04长期支持。
当前回答
另一种变化,我猜:P
python3 -c 'print(__import__("tensorflow").__version__)'
其他回答
如果你有TensorFlow 2.x:
sess =tf. compat_v1 . session (config=tf. compat_v1 . configproto (log_device_placement=True))
Tensorflow版本在Jupyter Notebook:-
!pip list | grep tensorflow
打印人类可读格式的python版本
python -c 'import sys; print(".".join(map(str, sys.version_info[:3])))'
在TensorFlow最新版本1.14.0中
特遣部队。版本
已弃用,而不是这种用法
tf.version.VERSION
错误:
WARNING: Logging before flag parsing goes to stderr.
The name tf.VERSION is deprecated. Please use tf.version.VERSION instead.
Tensorflow的版本可以通过以下简单的步骤在jupyter笔记本上检查。
import tensorflow as tf
print(tf.__version__) # for Python 3
推荐文章
- 证书验证失败:无法获得本地颁发者证书
- 安装tzdata非交互式
- 当使用pip3安装包时,“Python中的ssl模块不可用”
- 无法切换Python与pyenv
- Python if not == vs if !=
- 如何从终端/命令行调用VS代码编辑器
- 如何从scikit-learn决策树中提取决策规则?
- 为什么在Mac OS X v10.9 (Mavericks)的终端中apt-get功能不起作用?
- 将旋转的xtick标签与各自的xtick对齐
- 为什么元组可以包含可变项?
- 如何合并字典的字典?
- 在Jar文件中运行类
- 如何创建类属性?
- 不区分大小写的“in”
- 在Python中获取迭代器中的元素个数