摘要: 一、load 1、cpu——cpu、gpu——gpu checkpoint = t.load(_.pth) 2、cpu——gpu checkpoint = t.load(_.pth, map_location=lambda storage, loc: storage.cuda(i)) 3、gpu—— 阅读全文
posted @ 2020-09-18 16:47 6+0 阅读(163) 评论(0) 推荐(0) 编辑
摘要: model_new = nn.DataParallel(model, device_ids) 返回一个新的model output = nn.parallel.data_parallel(model, input, device_ids) 返回输出的数据 阅读全文
posted @ 2020-09-18 16:08 6+0 阅读(342) 评论(0) 推荐(0) 编辑