Shortcuts

torch.cuda.current_device

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

返回当前选定设备的索引。

Return type

int