查看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. c/c++编码规范(1)--头文件

    最近工作稍微轻松一点,就再学习了一下编码规范.遂记些笔记,以便查阅. 这次学习的是Google 开源项目风格指南中文版,地址是:http://zh-google-styleguide.readthed ...

  2. 【OSS】工具类

    package com.aliyun.oss.demo; import com.aliyun.oss.ClientException; import com.aliyun.oss.OSSClient; ...

  3. android#boardcast#发送自定义广播

    广播主要分为两种类型,标准广播和有序广播,通过实践的方式来看下这两种广播具体的区别. 一.发送标准广播 在发送广播之前,我们还是需要先定义一个广播接收器来准备接收此广播才行,不然发出去也是白发.因此新 ...

  4. 今天发现一个Window系统服务增删改查神器:NSSM

    官网地址:https://nssm.cc Win10系统下这个:https://nssm.cc/ci/nssm-2.24-101-g897c7ad.zip 官方的帮助,英语的,可以大概看一下: htt ...

  5. web代码审计题

    @题名:code i春秋https://www.ichunqiu.com/battalion wp:https://www.ichunqiu.com/writeup/detail/4139

  6. luoguP2634聪聪可可(点分治)

    题目链接:https://www.luogu.org/problem/P2634 题意:给一颗树,求距离的模3为0的点对数量,注意(1,1)算一个点对,(1,2)和(2,1)算两个点对. 思路:和点分 ...

  7. [Comet OJ - Contest #7 D][52D 2417]机器学习题_斜率优化dp

    机器学习题 题目大意: 数据范围: 题解: 学长说是决策单调性? 直接斜率优化就好了嘛 首先发现的是,$A$和$B$的值必定是某两个$x$值. 那么我们就把,$y$的正负分成两个序列,$val1_i$ ...

  8. 【转帖】知乎关于鸿蒙OS的思考

    作者:bacon xu链接:https://www.zhihu.com/question/339567108/answer/782431141来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非 ...

  9. ES-基本概念

    目录: 1.  ElasticSearch是什么 2. 基本概念 3. 几个关键词   正文: 1.  ElasticSearch是什么     ElasticSearch是一个基于Lucene的搜索 ...

  10. django时区与时间差的问题

    时区的正确配置方式: # 这里还可以配置成中文 一般用不到 LANGUAGE_CODE = 'en-us' # TIME_ZONE = 'UTC' TIME_ZONE = 'Asia/Shanghai ...