>>> import torch
>>> if_cuda =torch.cuda.is_available()
>>> print("if_cuda=",if_cuda)
if_cuda= True
>>> gpu_count = torch.cuda.device_count()
>>> print("gpu_count=",gpu_count)
gpu_count= 8
pytorch GPU操作事例
最新推荐文章于 2024-08-09 16:21:21 发布
>>> import torch
>>> if_cuda =torch.cuda.is_available()
>>> print("if_cuda=",if_cuda)
if_cuda= True
>>> gpu_count = torch.cuda.device_count()
>>> print("gpu_count=",gpu_count)
gpu_count= 8