Shortcuts

torch.cuda.device_count

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

返回可用的GPU数量。

Return type

int