[英]How to install tensorflowgpu-version with lower(compatible) version of cudatoolkit and cudnn
每次我在 anaconda 上安裝tensorflow-gpu
時,它會自動安裝帶有最新可用版本的cudatoolkit
和cudnn
的tensorflow-gpu
,即使它與我已經安裝在我的計算機上的顯卡和 cuda 不兼容,這會在以后產生一個大問題在模擬中。
例如我有 RTX3060 並且我正在安裝tensorflow-gpu 2.5.0
,我已經安裝了 cuda 11.1 但是當我使用 anaconda 安裝它時
"conda install tensorflow-gpu=2.5.0"
它將安裝cudatoolkit 11.3.x
...和最先進的可用 cudnn
您可以使用以下兼容cudatoolkit
和cudnn
版本的命令安裝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.