一句code判断CUDA可用性:
python -c "import torch; print('CUDA 可用性:', torch.cuda.is_available()); print('显卡名称:', torch.cuda.get_device_name(0) if torch.cuda.is_available() else '无')"
一句code判断CUDA可用性:
python -c "import torch; print('CUDA 可用性:', torch.cuda.is_available()); print('显卡名称:', torch.cuda.get_device_name(0) if torch.cuda.is_available() else '无')"