torch.cuda.is_available¶ torch.cuda.is_available()[source][source]¶ 返回一個布林值,指示 CUDA 當前是否可用。 返回型別 bool