torch.cuda.is_available¶ torch.cuda.is_available()[source][source]¶ 返回一个布尔值,指示 CUDA 当前是否可用。 返回类型 bool