查看TensorFlow的版本以及安装路径

进入到Python环境

import tensorflow as tf
tf.__version__ # 查看版本
tf.__path__ # 查看安装路径

查看TensorFlow版本的另一种方法

sudo pip3 show tensorflow-gpu   # GPU版
sudo pip3 show tensorflow # 非GPU版

查看TensorFlow版本的另一种方法

$ python
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from tensorflow.python.client import device_lib
>>> device_lib.list_local_devices()

输出

2019-05-18 21:36:53.492143: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-05-18 21:36:53.606863: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:898] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-05-18 21:36:53.607366: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1356] Found device 0 with properties:
name: GeForce MX150 major: 6 minor: 1 memoryClockRate(GHz): 1.341
pciBusID: 0000:01:00.0
totalMemory: 1.96GiB freeMemory: 1.27GiB
2019-05-18 21:36:53.607382: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2019-05-18 21:36:53.826350: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-05-18 21:36:53.826381: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929] 0
2019-05-18 21:36:53.826388: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0: N
2019-05-18 21:36:53.826499: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/device:GPU:0 with 1017 MB memory) -> physical GPU (device: 0, name: GeForce MX150, pci bus id: 0000:01:00.0, compute capability: 6.1)
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 1057080042639158477
, name: "/device:GPU:0"
device_type: "GPU"
memory_limit: 1067384832
locality {
bus_id: 1
links {
}
}
incarnation: 9801033547599324942
physical_device_desc: "device: 0, name: GeForce MX150, pci bus id: 0000:01:00.0, compute capability: 6.1"
]

另一种方法

查看tensorflow-gpu的版本:

pip list

最新文章

  1. 通杀所有系统的硬件漏洞?聊一聊Drammer,Android上的RowHammer攻击
  2. C++线性方程求解
  3. java二维数组简单初步理解
  4. hdu 3585 二分+最大团
  5. java后台生成zip打包文件
  6. Everything
  7. 在CDHtmlDialog中处理WindowClosing
  8. HDU 3802 Ipad,IPhone
  9. 小学生之Hibernate插入数据修改数据使用数据库默认值的实现
  10. pyhton之路---面向对象
  11. 最简单的基于DirectShow的示例:视频播放器自定义版
  12. mui单选和多选框
  13. Python作业之分页显示内容
  14. BZOJ.3631.[JLOI2014]松鼠的新家(树上差分)
  15. JQuery插件之【jqGrid】常用语法整理
  16. 程序中使用now()函数对性能的影响
  17. Java知多少(74)基础类库
  18. 从flask视角理解angular(三)ORM VS Service
  19. 运行成功的Demo(Python+Appium)
  20. Python如何下载文件

热门文章

  1. java数据机构之自定义栈
  2. 二叉树实例学习(四)——获取节点的高度函数getHight()
  3. 短路与(&&)、短路或(||)
  4. cisco上配置 pppoe拨号
  5. Linux正则表达式扩展部分第一波深度实践详解
  6. jumpserver跳板机(堡垒机)安装
  7. [转帖]k8s.gcr.io镜像无法下载的问题
  8. 小白学习django第一站-环境配置
  9. Feign的雪崩处理
  10. Codeforces 1240B. Sequence Sorting