簡體   English   中英

如何使用較低(兼容)版本的 cudatoolkit 和 cudnn 安裝 tensorflowgpu-version

[英]How to install tensorflowgpu-version with lower(compatible) version of cudatoolkit and cudnn

每次我在 anaconda 上安裝tensorflow-gpu時,它會自動安裝帶有最新可用版本的cudatoolkitcudnntensorflow-gpu ,即使它與我已經安裝在我的計算機上的顯卡和 cuda 不兼容,這會在以后產生一個大問題在模擬中。

例如我有 RTX3060 並且我正在安裝tensorflow-gpu 2.5.0 ,我已經安裝了 cuda 11.1 但是當我使用 anaconda 安裝它時

"conda install tensorflow-gpu=2.5.0" 

它將安裝cudatoolkit 11.3.x ...和最先進的可用 cudnn

您可以使用以下兼容cudatoolkitcudnn版本的命令安裝tensorflow-gpu

conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0
#It is recommended to use pip to install TensorFlow since it is  officially released to PyPI.
python3 -m pip install tensorflow-gpu==2.5.0
# Verify install:
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"

有關分步說明,請參閱此鏈接

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM