Shortcuts

torch.cuda.is_available

torch.cuda.is_available()[源代码]

返回一个布尔值,指示CUDA当前是否可用。

Return type

bool