一、GPU有关的基本操作
import torch
from torch import nn
1,查看gpu信息
if_cuda = torch.cuda.is_available()
print("if_cuda=",if_cuda)
gpu_count = torch.cuda.device_count(