查看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. JavaScript基本入门02

    目录 JavaScript基础入门 02 条件语句 if 语句 if .. else 语句 switch 结构 循环语句 while 循环 continue 关键字 do...while语句 for ...

  2. 【计算机视觉】Vibe Vibe+

    ViBe是一种像素级的背景建模.前景检测算法,该算法主要不同之处是背景模型的更新策略,随机选择需要替换的像素的样本,随机选择邻域像素进行更新.在无法确定像素变化的模型时,随机的更新策略,在一定程度上可 ...

  3. 【VS开发】程序员对内存的理解

    程序员对内存的理解 在C和C++语言开发中,指针.内存一直是学习的重点.因为C语言作为一种偏底层的中低级语言,提供了大量的内存直接操作的方法,这一方面使程序的灵活度最大化,同时也为bug埋下很多隐患. ...

  4. java面试指导2019-9-16(arraylist)

    ArrayList源码分析 System.arraycopy()和Arrays.copyOf()方法 通过上面源码我们发现这两个实现数组复制的方法被广泛使用而且很多地方都特别巧妙.比如下面add(in ...

  5. c++文件指针读写图片文件

    #include "stdafx.h"#include <string>using namespace std;int _tmain(int argc, _TCHAR* ...

  6. Oracle-DQL 3- 单行函数

    单行函数: --使用函数对表中的数据进行运算和处理,针对每行数据返回一个结果,叫做单行函数--包括数字函数,字符函数,日期函数,转换函数,其他函数 1.数字函数 --round(m,n) 将数字m精确 ...

  7. linux系统redis安装及使用

    1.下载redishttp://download.redis.io/releases/redis-5.0.5.tar.gz$ wget http://download.redis.io/release ...

  8. centos7 源码安装 MongoDb

    1.下载源码包 curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.2.12.tgz 2.解压 放到 /usr/local/ ...

  9. servlet容器,web容器,spring容器,springmvc容器的区别(转)

    web容器中有servlet容器,spring项目部署后存在spring容器和springmvc容器.其中spring控制service层和dao层的bean对象.springmvc容器控制contr ...

  10. Centos7 系统启动docker报错 inotify add watch failed

    环境说明: 最近新装的系统启动docker报错,之前没有遇到过.(之前都是系统直接启动,新装机器无报错的情况) 当时排查了很久没找到问题在哪,观察报错信息如下: 提示表文件失败,没有这个文件或者目录. ...