conda create -n your_vir_name python==3.6.8 pip
conda activate your_vir_name
conda install cudatoolkit=10.1.243
conda install cudnn=7.6.0=cuda10.1_0
pip install tensorflow-gpu==2.3.0 -i https://pypi.mirrors.ustc.edu.cn/simple/
下面测试能否正常链接GPU:
import tensorflow as tf
tf.config.list_physical_devices('GPU')
如果结果为:
则表示可以正常访问。