ai识别训练环境配置.md 766 B

ai识别环境配置

查看环境

#c 环境检查 ai识别训练因为使用cuda,和python, 所以我们需要检查一下对应的版本 #e python版本查看

python -V

或者

python --version

#e cuda版本查看

nvcc -V

#e torch版本查看

pip show torch

#c 切换torch版本 可能有时候需要使用特定的torch版本,
在此时需要先使用pip卸载torch随后在安装新的torch版本 #e 卸载torch

pip uninstall torch

#e 安装特定torch版本

pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

安装必要的环境

#c 安装 cuda #c 安装 cudnn