Samar-blog

导航

2025年11月26日 #

P30_利用GUP训练(二)

摘要: 1.代码实战: (1)调用.to()方法即可。 .to(device) device = torch.device("cpu") torch.device("cuda") 点击查看代码 #12.定义训练的设备 # device = torch.device("cpu") device = torch 阅读全文

posted @ 2025-11-26 20:06 风居住的街道DYL 阅读(4) 评论(0) 推荐(0)

P29_利用GUP训练(一)

摘要: 1.方法1:调用.cuda()方法 (1)找到网络模型、数据(输入、标注)和损失函数,然后调用其.cuda()方法: ①网络模型如dyl模型:dyl.cuda(),②数据(输入、标注)即:imgs = imgs.cuda(),targets = targets.cuda(),③损失函数即loss_f 阅读全文

posted @ 2025-11-26 17:52 风居住的街道DYL 阅读(10) 评论(0) 推荐(0)