摘要: 单机单卡 1.判断卡存在 torch.cuda.is_available() 2.数据拷贝到GPU data.cuda() 3.模型拷贝到GPU model.cuda() 4.加载的时候,需要map_location参数设置加载到哪个GPU torch.load(path, map_location 阅读全文
posted @ 2022-04-01 21:43 哈哈哈喽喽喽 阅读(2375) 评论(0) 推荐(0)