尽管安装了 tensorflow-gpu,但 GPU 不用于计算 [英] GPU is not used for calculations despite tensorflow-gpu installed

查看:53
本文介绍了尽管安装了 tensorflow-gpu,但 GPU 不用于计算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的电脑安装了以下软件:Anaconda (3)、TensorFlow (GPU) 和 Keras.有两个 Anaconda 虚拟环境 - 一个使用 TensorFlow 用于 Python 2.7,一个用于 3.5,两个 GPU 版本,安装到 TF 指令.(我之前在一个单独的环境中安装了一个 CPU 版本的 TensorFlow,但我已经删除了它.)

My computer has the following software installed: Anaconda (3), TensorFlow (GPU), and Keras. There are two Anaconda virtual environments - one with TensorFlow for Python 2.7 and one for 3.5, both GPU version, installed according to the TF instructions. (I had a CPU version of TensorFlow installed previously in a separate environment, but I've deleted it.)

当我运行以下命令时:

source activate tensorflow-gpu-3.5
python code.py

并检查 nvidia-smi 它仅显示 Python 的 3MiB GPU 内存使用情况,因此看起来 GPU 不用于计算.(code.py 是使用 Keras 实现的简单深度 Q 学习算法)

and check nvidia-smi it shows only 3MiB GPU Memory Usage by Python, so it looks like GPU is not used for calculations. (code.py is a simple deep Q-learning algorithm implemented with Keras)

有什么想法可能会出错吗?

Any ideas what can be going wrong?

推荐答案

我的 GPU 没有运行是因为 CuDNN 的安装损坏,更准确地说,库和源来自不同版本的 CuDNN.

The reason my GPU wasn't running was because of a broken installation of the CuDNN, more precisely libraries and source came from different versions of CuDNN.

已通过 the遵循一条建议.

这篇关于尽管安装了 tensorflow-gpu,但 GPU 不用于计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆