3 lines
129 B
Python
3 lines
129 B
Python
import torch
|
|
print(torch.cuda.is_available()) # 应输出 True
|
|
print(torch.cuda.device_count()) # 显示检测到的 GPU 数量 |