Pytorch GPU

mac2022-06-30  44

https://www.cnblogs.com/QingHuan/p/10016959.html

net = Net() if torch.cuda.is_available(): print("Using GPU") device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") net.to(device)
最新回复(0)