3080 装 cuda 的坑

1 你要用 TensorFlow2.4 的 gpu 版本

2 cuda10.1 3080不认,会出现不报错也不训练的情况

3 cuda要用 11.0 ,cudnn是 8.0.5

4 numpy报错的话

pip install numpy==1.19.3

5 然后cudnn目前还无法通过 conda、pip之类的安装,下载之后copy文件

lib文件

G:\迅雷下载\cudnn-11.0-windows-x64-v8.0.5.39\cuda\lib\x64

D:\ProgramWorks\Miniconda3\envs\tf24\Library\lib

include文件

G:\迅雷下载\cudnn-11.0-windows-x64-v8.0.5.39\cuda\include

D:\ProgramWorks\Miniconda3\envs\tf24\Library\include

bin文件

G:\迅雷下载\cudnn-11.0-windows-x64-v8.0.5.39\cuda\bin

D:\ProgramWorks\Miniconda3\envs\tf24\Library\bin

import tensorflow as tf
import os

os.environ[‘TF_CPP_MIN_LOG_LEVEL’] = ‘2’  # 不显示等级2以下的提示信息

print(‘GPU’, tf.test.is_gpu_available())

a = tf.constant(2.0)
b = tf.constant(4.0)
print(a + b)

pip install tensorflow-gpu==2.4 –upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install tensorflow-gpu==2.4 –upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple some-package

 conda install cudatoolkit=11

然后就是下载 cudnn,拷贝

pip install sklearn
pip install matplotlib
pip install opencv-python
pip install numpy==1.19.3
jupyter notebook
pip install pandas