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

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

问题描述

我的计算机安装了以下软件:Anaconda(3),TensorFlow(GPU)和Keras. 有两种Anaconda虚拟环境-一种是使用TensorFlow for 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.

它已通过进行了修复遵循以下建议.

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

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