Skip to content

Commit

Permalink
Use cuda if available, otherwise use cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
whiterabbit1983 committed Mar 22, 2021
1 parent 82191b9 commit cfd8424
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion comet/data/config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import json
import torch
from comet.utils import DD

device = "cuda"
device = "cuda" if torch.cuda.is_available() else "cpu"

save = False
test_save = False
Expand Down

0 comments on commit cfd8424

Please sign in to comment.