Skip to content

Commit

Permalink
rectify gpu assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
yjxiong committed Aug 16, 2017
1 parent 93b3441 commit bdd8742
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test_models.py
Expand Up @@ -89,8 +89,7 @@
devices = list(range(args.workers))


net = torch.nn.DataParallel(net, device_ids=devices)
net.cuda()
net = torch.nn.DataParallel(net.cuda(devices[0]), device_ids=devices)
net.eval()

data_gen = enumerate(data_loader)
Expand Down

0 comments on commit bdd8742

Please sign in to comment.