【问题标题】:How to find which TensorFlow is installed in my windows system? Whether it is CPU or GPU TensorFlow如何查找我的 Windows 系统中安装了哪个 TensorFlow?无论是 CPU 还是 GPU TensorFlow
【发布时间】:2019-02-07 01:57:57
【问题描述】:

我在Anaconda 命令提示符下尝试了以下命令

pip show tensorflow 

这给了我结果,

Name: tensorflow
Version: 1.10.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: opensource@google.com
License: Apache 2.0
Location: d:\softwares\pycond\envs\tensorflow2\lib\site-packages
Requires: termcolor, absl-py, grpcio, tensorboard, wheel, protobuf, gast, six, numpy, setuptools, astor

我想知道安装的 TensorFlow 是支持 CPU 还是支持 GPU。我怎样才能得到这些信息?

【问题讨论】:

  • pip show tensorflow-gpu , pip list | grep tensorflow-gpu , python -c 'import tensorflow as tf; print(tf.test.gpu_device_name())'
  • 你有anaconda navigator的访问权限吗?

标签: python tensorflow anaconda prompt


【解决方案1】:

TensorFlow pip 包包括对支持 CUDA® 的卡的 GPU 支持

pip show tensorflow

对于旧版本的 TensorFlow:

对于 1.15 及更早的版本,CPU 和 GPU 包是分开的:

pip install tensorflow==1.15      # CPU
pip install tensorflow-gpu==1.15  # GPU

因此,1.15 及更早版本的包名称不同。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-04-19
    • 1970-01-01
    • 1970-01-01
    • 2017-12-17
    • 1970-01-01
    • 2020-10-02
    • 1970-01-01
    • 2019-03-08
    相关资源
    最近更新 更多