查看TensorFlow的版本以及安装路径
查看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()
python默认安装路径输出
2019-05-18 21:36:53.492143: I tensorflow/core/platform/cpu_: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_: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/: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/:1435] Adding visible gpu devices: 0
2019-05-18 21:36:53.826350: I tensorflow/core/common_runtime/gpu/:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-05-18 21:36:53.826381: I tensorflow/core/common_runtime/gpu/:929] 0
2019-05-18 21:36:53.826388: I tensorflow/core/common_runtime/gpu/:942] 0: N
2019-05-18 21:36:53.826499: I tensorflow/core/common_runtime/gpu/: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
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论