当前环境:
miniconda
python=3.6.8
tensorflow-gpu=2.3.0
cudatoolkit=10.1.243
cudnn=7.6.0=cuda10.1_0
升级方式一:
pip install tensorflow-gpu==2.5.0 -i https://pypi.mirrors.ustc.edu.cn/simple/
conda install cudatoolkit=11.2 cudnn -c conda-forge
注:如果安装时提示主频道找不到资源,可以添加-c参数,指定频道;
升级方式二:
conda upgrade --all
pip install tensorflow-gpu==2.5.0 -i https://pypi.mirrors.ustc.edu.cn/simple/
第二种升级较第一种更全面,但更耗时。
升级后:
python=3.6.8
tensorflow-gpu=2.5.0
cudatoolkit=11.2.2
cudnn=8.2.1.32
几个相关官方链接:
Build from source on Windows | TensorFlow