原来是:
1 2 3 |
use_cuda = (args.gpu >= 0) and torch.cuda.is_available() device = torch.device("cuda" if use_cuda else "cpu") model = model.to(device) |
这时用的是单GPU,我们需要改为多GPU,需要在model.to(device)
之前加一句
1 |
model = nn.DataParallel(model, device_ids = [0, 1]) |
即可。
本文最后更新于2019年12月25日,已超过 1 年没有更新,如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢!
学习
学习
太需要了!謝謝!!
啊
哈哈哈
不知为何 执行 systemctl enable qbittorrent 以使 qBittorrent 开机启动,执行 systemctl start qbittorrent 以使 qBittorre
终端怎么换啊
啊啊为什么啊,我开个终端它一直加载,纯纯哭泣了