Win10下安装CUDA11.0+CUDNN8.0+tensorflow-gpu2.4.1+pytorch1.7.0+paddlepaddle-gpu2.0.0
作者:FriendshipTang 时间:2022-05-08 19:29:32
下载地址
官方下载:CUDA和CUDNN.
安装CUDA
安装之前,建议关掉360安全卫士
双击cuda_11.0.3_451.82_win10.exe文件
根据自己需要更改安装路径
将Visual Studio Integration的勾去掉
配置环境变量
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\bin;
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\libnvvp;
安装CUDNN
将下载的CUDNN解压缩,如下图。
将将CUDNN文件夹里面的bin、include、lib文件直接复制到CUDA的安装目录,如下图为CUDA的安装位置,粘贴过来直接覆盖即可。
# CUDA的安装目录
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0
等待复制完成,即可!
验证CUDA是否安装成功
打开cmd,输入如下命令,即可!
nvcc -V
安装tesorflow-gpu2.4.1
查看对应版本
https://tensorflow.google.cn/install/source_windows#gpu
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow-gpu==2.4.1
测试代码
import tensorflow as tf
import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
print(tf.__version__)
a = tf.constant(1.)
b = tf.constant(2.)
print(a+b)
print('GPU:', tf.test.is_gpu_available())
安装pytorch-gpu1.7.0
查看对应版本
https://pytorch.org/get-started/previous-versions/
pip install torch===1.7.0+cu110 torchvision===0.8.1+cu110 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
测试代码
import torch
print(torch.__version__)
print(torch.cuda.is_available())
安装paddlepaddle-gpu2.0.0
查看对应版本
https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/2.0/install/pip/windows-pip.html
python -m pip install paddlepaddle-gpu==2.0.0.post110 -f https://paddlepaddle.org.cn/whl/stable.html
测试代码
import paddle
paddle.utils.run_check()
来源:https://blog.csdn.net/FriendshipTang/article/details/114412291
标签:CUDA,CUDNN,tensorflow-gpu,pytorch,paddlepaddle-gpu
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
python开发一款翻译工具
2022-01-19 07:28:43
![](https://img.aspxhome.com/file/2023/5/72035_0s.png)
Python稀疏矩阵及参数保存代码实现
2021-05-10 08:18:34
![](https://img.aspxhome.com/file/2023/2/123462_0s.png)
使用wxpy实现自动发送微信消息功能
2022-04-01 21:16:06
![](https://img.aspxhome.com/file/2023/2/78572_0s.jpg)
Pandas中resample方法详解
2021-10-03 09:57:40
在Django admin中编辑ManyToManyField的实现方法
2021-03-05 18:03:47
Anaconda 离线安装 python 包的操作方法
2021-08-11 22:38:27
![](https://img.aspxhome.com/file/2023/1/135411_0s.jpg)
Python求两个字符串最长公共子序列代码实例
2021-01-13 20:49:08
![](https://img.aspxhome.com/file/2023/1/77771_0s.png)
基于spring boot 日志(logback)报错的解决方式
2022-05-12 08:13:46
Python运行不显示DOS窗口的解决方法
2021-01-18 08:06:16
使用Python微信库itchat获得好友和群组已撤回的消息
2021-03-25 08:27:44
![](https://img.aspxhome.com/file/2023/9/134709_0s.png)
Python爬虫小练习之爬取并分析腾讯视频m3u8格式
2022-07-03 08:44:32
![](https://img.aspxhome.com/file/2023/5/90345_0s.png)
python 如何将带小数的浮点型字符串转换为整数
2021-04-24 01:35:51
django做form表单的数据验证过程详解
2023-11-10 12:26:13
![](https://img.aspxhome.com/file/2023/1/89421_0s.png)
Python 模拟动态产生字母验证码图片功能
2022-02-10 21:03:35
![](https://img.aspxhome.com/file/2023/3/108053_0s.jpg)
统计热门文章的算法
2008-03-16 15:40:00
Oracle Index 的三个问题
2010-07-26 12:53:00
python3判断url链接是否为404的方法
2021-11-12 15:17:54
基于python实现名片管理系统
2023-02-03 12:33:50
![](https://img.aspxhome.com/file/2023/2/104792_0s.jpg)
php 时间计算问题小结
2023-11-03 14:37:06
keras topN显示,自编写代码案例
2021-03-19 03:15:13