Skip to content

Commit

Permalink
cuda set device
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamagarwal92 committed May 28, 2020
1 parent 556def3 commit 6c4e2b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ logs/
# virtualenv
venv/
ENV/

.idea/
1 change: 1 addition & 0 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
if args.gpu_ids[0] >= 0
else torch.device("cpu")
)
torch.cuda.set_device(device)

# Print config and args.
print(yaml.dump(config, default_flow_style=False))
Expand Down

0 comments on commit 6c4e2b8

Please sign in to comment.