tgieruc commited on
Commit
36f533f
1 Parent(s): 7989d1a

fixed device not found

Browse files
Files changed (1) hide show
  1. model.py +1 -1
model.py CHANGED
@@ -7,7 +7,7 @@ import torchvision.transforms as T
7
  class SegmentationModel:
8
  """The segmentation model."""
9
 
10
- def __init__(self, path, device: torch.device):
11
  """
12
  Initializes the segmentation model, with the given path.
13
 
 
7
  class SegmentationModel:
8
  """The segmentation model."""
9
 
10
+ def __init__(self, path, device='cuda' if torch.cuda.is_available() else 'cpu'):
11
  """
12
  Initializes the segmentation model, with the given path.
13