Shortcuts

torch.cuda.is_initialized

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

返回 PyTorch 的 CUDA 状态是否已初始化。