Commit 07fb05e0 authored by lishen's avatar lishen

[fix]

parent cf2922fa
......@@ -214,8 +214,9 @@ def main():
cudnn.benchmark = True
net.cuda()
device_ids = [0, 1, 2, 3, 4]
net = nn.DataParallel(net, device_ids=device_ids)
optimizer = nn.DataParallel(optimizer, device_ids=device_ids)
net = nn.DataParallel(net).to(device_ids)
# net = nn.DataParallel(net, device_ids=device_ids)
# optimizer = nn.DataParallel(optimizer, device_ids=device_ids)
if args.use_checkpoint:
#net.load_state_dict(torch.load(checkpath))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment