Loading... > 系统:Win10 > > 显卡:GTX1050Ti(Notebook) > > 版本需求: > > 1. [显卡驱动:根据自己的显卡选择(类型选SD)](https://www.nvidia.cn/Download/index.aspx?lang=cn) > 2. [VS 2015-2019 Runtime](https://down.fuju.life/CUDA/vc_redist.x64.exe) > 3. [CUDA:cuda_11.0.2_451.48_win10](https://developer.nvidia.com/zh-cn/cuda-downloads?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exelocal) > 4. [cuDNN:cudnn-11.2-windows-x64-v8.1.0.77](https://developer.nvidia.com/cudnn-download-survey) > 5. TensorFlow 2.4.1 ## [软硬件要求(点击前往官网查看)](https://www.tensorflow.org/install/gpu?hl=zh_cn) ![](https://fuju.life/usr/uploads/2021/03/3286211416.png) ![](https://pic.fujuage.com/images/2021/03/08/20210308200823.png) ## 安装流程(必须按照此顺序安装) ### 显卡驱动 1. 下载对应的驱动 2. 安装 1. 选择NVIDIA图形驱动 2. 精简安装即可 ### VS 2015-2019 Runtime 1. 安装 2. 重启 ### CUDA 1. 下载对应版本 2. 自定义安装(仅选择CUDA) ![](https://fuju.life/usr/uploads/2021/03/2835693612.png) 3. `nvcc -V`检测一下是否安装成功 ![](https://pic.fujuage.com/images/2021/03/08/20210308214253.png) ### cuDNN 1. 下载对应版本 2. 解压出来(有3个文件夹) 3. 拷贝到对应位置即可(将解压的3个文件夹拷贝到CUDA的路径下就好了) ``` Copy <installpath>\cuda\bin\cudnn*.dll to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\vx.x\bin. Copy <installpath>\cuda\include\cudnn*.h to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\vx.x\include. Copy <installpath>\cuda\lib\x64\cudnn*.lib to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\vx.x\lib\x64. ``` ### TensorFlow2.4.1 安装 ``` pip install --upgrade tensorflow ``` ### 测试 ``` python -c "import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))" ``` 正常运行: ![](https://pic.fujuage.com/images/2021/03/08/J4LKT72CKXJ1P2AALHM.png) ## 参考 1. CUDA官方文档:[https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html](https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html) 2. cuDNN官方文档:[https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#install-windows](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#install-windows) Last modification:April 1, 2021 © Allow specification reprint Like