import torch from torch import nn print(torch.device('cpu')) print(torch.cuda.device_count())
输出:
cpu 0
over