Spaces:
Sleeping
Sleeping
self.device set to gpu
Browse files
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 |
-
|
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 |
|