查看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

查看TensorFlow的版本以及安装路径的更多相关文章

  1. linux rpm问题:怎样查看rpm安装包的安装路径

      x rpm问题:怎样查看rpm安装包的安装路径 2010-07-12 21:19:15 标签:rpm linux 路径 休闲 职场 rpm -qpl xxxxxx.rpm 1.如何安装rpm软件包 ...

  2. Linux中查看某 个软件的安装路径

    本人qq群也有许多的技术文档,希望可以为你提供一些帮助(非技术的勿加). QQ群:   281442983 (点击链接加入群:http://jq.qq.com/?_wv=1027&k=29Lo ...

  3. 查看已安装tensorflow版本以及安装路径

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

  4. pip 查看软件包 可用版本并安装; pip 查看 numpy 可用版本并安装

    最近需要安装 numpy 的旧版本,发现不知道如何查看可以安装旧版本,解决方法在此进行记录: 然后找到你对应的版本进行安装就可以了: 保持更新,更多精彩内容,请关注 cnblogs.com/xuyao ...

  5. linux下查看和设置软件的安装路径

    1:你可以通过whereis 软件名来查找系统里的文件位置 比如你想查找eclipse文件,那么就: [root@localhost ~]# whereis eclipse 会显示: eclipse: ...

  6. 查看python和NumPy版本和安装路径

    记录查看Python和NumPy版本以及路径的几条命令 # 查看Python版本及路径 python -V python -c "import sys;print(sys.executabl ...

  7. TensorFlow GPU版本的安装与调试

    笔者采用python3.6.7+TensorFlow1.12.0+CUDA10.0+CUDNN7.3.1构建环境 PC端配置为GTX 1050+Intel i7 7700HQ 4核心8线程@2.8GH ...

  8. linux下如何查看一个服务所在的安装路径?

    当接手一个不是自己维护的linux服务器,我们常常会想要看看该服务器上是否安装了某个服务,这个服务安装的路径在哪? redis 是开发过程中常常会用到的一个服务,我这里就以这个服务为例,进行说明. 1 ...

  9. arcgis python 获得arcgis的版本和安装路径

    import arcpy # Use the dictionary iteritems to iterate through # the key/value pairs from GetInstall ...

随机推荐

  1. 1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

    在数据库执行脚本文件时,执行到一半会遇到  这种问题: 出错处:2018-05-14 18:53:38 行号:712454 错误代码: 1293 - Incorrect table definitio ...

  2. LeetCode.1189-balloon实例数最大值(Maximum Number of Balloons)

    这是小川的第次更新,第篇原创 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第267题(顺位题号是1189).给定一个字符串文本,使用文本字符来构成单词"balloon&qu ...

  3. 【CSS】如何在一个页面中引入样式css

    CSS(Cascading Style Sheet)又叫层叠样式表.是我们学习前端必不可少的一门语言,学习它其实就是为了学会如何去更改页面标签的样式.目前使用最广的是css3,但同样的,他是从css2 ...

  4. 【FFMPEG】使用ffmpeg类库打开流媒体

    版权声明:本文为博主原创文章,未经博主允许不得转载. 使用ffmpeg类库进行开发的时候,打开流媒体(或本地文件)的函数是avformat_open_input(). 其中打开网络流的话,前面要加上函 ...

  5. 菜鸟系列k8s——快速部署k8s集群

    快速部署k8s集群 1. 安装Rancher Rancher是业界唯一完全开源的企业级容器管理平台,为企业用户提供在生产环境中落地使用容器所需的一切功能与组件. Rancher2.0基于Kuberne ...

  6. Design Circular Queue

    Design your implementation of the circular queue. The circular queue is a linear data structure in w ...

  7. 批量导出docker images 的一个简单方法

    docker images |cut -c - |xargs docker save -o iamges.tar 主要 最大的长度不能超过 18 超过了就得改一下 -c 后面的数据长度 最终效果为: ...

  8. IDEA自动生成的注释模板

    使用效果如下: * * @功能描述 : $params$ * @return $returns$ * @author xuetao */ 其中 $params$的表达式如下: groovyScript ...

  9. MySQL-存储引擎-创建表-字段数据类型-严格模式-字段约束-键-02

    目录 扩展点 查看服务端字符.IP.端口配置 取消本次错误输入 例外情况 database 数据库操作 table 数据表操作 查看MySQL存储引擎 常见几个存储引擎 InnoDB MyISAM M ...

  10. Jmeter之逻辑控制器/定时器

    Jmeter逻辑控制器 更新中 线程组->添加->逻辑控制器->XX控制器 1.仅一次控制器 使用场景:线程数为1,登录1次,循环浏览N次. 如果,登录账号参数化,线程数为M时,登录 ...