如何在带有conda的Windows 10上安装Tensorflow 2 GPU? [英] How to install tensorflow 2 gpu on windows 10 with conda?

查看:75
本文介绍了如何在带有conda的Windows 10上安装Tensorflow 2 GPU?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Nvidia RTX 2070,想使用GPU编程.我已经通过Conda轻松安装了Cuda,但以某种方式张量流未检测到任何GPU设备.我的tensorflow版本是2.3.0.

I have Nvidia RTX 2070 and want to make use of GPU programming. I have installed Cuda the easy way through Conda but somehow the tensorflow is not detecting any GPU device. My tensorflow version is 2.3.0.

我已经尝试在anaconda提示符下使用以下命令,但是没有运气.

I have already tried using the following command on anaconda prompt but no luck.

conda create --name tfgpu python = 3.8.5 tensorflow-gpu

我还尝试了较长版本的下载CUDA工具包和cudnn文件并复制粘贴文件.但似乎没有任何效果.当我运行以下命令时,我总是得到0.

I have also tried the longer version of downloading the CUDA toolkit and the cudnn file and copy pasting the files. but nothing seems to work. When I run the following command, I always get 0.

print(可用的GPU数量:",len(tf.config.experimental.list_physical_devices('GPU')))

真的需要帮助.

推荐答案

您可以查看本指南以安装TensorFlow和进行测试,还请确保从Nvidia的官方站点下载并安装最新的cudnn和Cuda库. https://towardsdatascience.com/guide-to-conda-for-tensorflow-and-pytorch-db69585e32b8

You can check this guide for installing TensorFlow and testing, also be sure to download and install latest cudnn and Cuda libraries from Nvidia's official site. https://towardsdatascience.com/guide-to-conda-for-tensorflow-and-pytorch-db69585e32b8

这篇关于如何在带有conda的Windows 10上安装Tensorflow 2 GPU?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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