如果您遇到以下问题之一,请参阅本文:
1. 如果torch.cuba.is_available()为 false 或除 True 以外的任何值
2.如果遇到错误:
NVIDIA-SMI 失败,因为它无法与 NVIDIA 驱动程序通信。确保已安装并运行最新的 NVIDIA 驱动程序。
3. 使用命令“ nvidia-smi ”时,任何与下面不类似的输出。
第 1 步:卸载现有 GPU 驱动程序
# First of all, we need to remove all of the previous dependencies
sudo apt-get purge nvidia-*
sudo apt-get update
sudo apt-get autoremove
第 2 步:搜索您可以安装的Nvidia驱动程序
sudo apt search