torch.Tensor.is_cuda

Tensor.is_cuda

如果张量存储在 GPU 上,则值为 True,否则为 False

本页目录