Update stamp_processing/utils.py
Browse files
stamp_processing/utils.py
CHANGED
@@ -19,7 +19,7 @@ def select_device(device: str = "") -> torch_device:
|
|
19 |
"""Return a torch.device instance"""
|
20 |
cpu = device.lower() == "cpu"
|
21 |
cuda = not cpu and torch.cuda.is_available()
|
22 |
-
return torch_device("cuda" if cuda else "cpu")
|
23 |
|
24 |
|
25 |
def load_yolo_model(weight_path: str, device: str) -> Tuple[Module, int]:
|
|
|
19 |
"""Return a torch.device instance"""
|
20 |
cpu = device.lower() == "cpu"
|
21 |
cuda = not cpu and torch.cuda.is_available()
|
22 |
+
return torch_device("cuda:1" if cuda else "cpu")
|
23 |
|
24 |
|
25 |
def load_yolo_model(weight_path: str, device: str) -> Tuple[Module, int]:
|