Skip to content

Commit 6c4e2b8

Browse files
cuda set device
1 parent 556def3 commit 6c4e2b8

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ logs/
3737
# virtualenv
3838
venv/
3939
ENV/
40+
41+
.idea/

train.py

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
if args.gpu_ids[0] >= 0
114114
else torch.device("cpu")
115115
)
116+
torch.cuda.set_device(device)
116117

117118
# Print config and args.
118119
print(yaml.dump(config, default_flow_style=False))

0 commit comments

Comments
 (0)