suryadev1 commited on
Commit
ccda18f
·
verified ·
1 Parent(s): bcf042f

self.device set to gpu

Browse files
Files changed (1) hide show
  1. new_test_saved_finetuned_model.py +2 -2
new_test_saved_finetuned_model.py CHANGED
@@ -47,8 +47,8 @@ class BERTFineTuneTrainer:
47
 
48
  # Setup cuda device for BERT training, argument -c, --cuda should be true
49
  # cuda_condition = torch.cuda.is_available() and with_cuda
50
- # self.device = torch.device("cuda:0" if cuda_condition else "cpu")
51
- self.device = torch.device("cpu") #torch.device("cuda:0" if cuda_condition else "cpu")
52
  # print(cuda_condition, " Device used = ", self.device)
53
  print(" Device used = ", self.device)
54
 
 
47
 
48
  # Setup cuda device for BERT training, argument -c, --cuda should be true
49
  # cuda_condition = torch.cuda.is_available() and with_cuda
50
+ self.device = torch.device("cuda:0" if cuda_condition else "cpu")
51
+ #self.device = torch.device("cpu") #torch.device("cuda:0" if cuda_condition else "cpu")
52
  # print(cuda_condition, " Device used = ", self.device)
53
  print(" Device used = ", self.device)
54