平凡之上
博观而约取,厚积而薄发! 守得云开见月明。

#P30-P33完结

 

利用GPU来训练

方法1:

思路:找到网络模型、数据(输入,标注)、损失函数。然后调用.cuda() 然后返回

 

方法2:

Device=torch.device("CPU")

torch.device("cuda:0")  #指定显卡

.to(device)

 

posted on 2021-11-27 19:09  平凡之上  阅读(21)  评论(0编辑  收藏  举报