Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ model = models.ross.efficientdet.model(backbone=models.ross.efficientdet.backbon
|
|
11 |
num_classes=2,
|
12 |
img_size=384)
|
13 |
|
14 |
-
state_dict = torch.load(checkpoint_path)
|
15 |
model.load_state_dict(state_dict)
|
16 |
|
17 |
infer_tfms = tfms.A.Adapter([*tfms.A.resize_and_pad(384),tfms.A.Normalize()])
|
|
|
11 |
num_classes=2,
|
12 |
img_size=384)
|
13 |
|
14 |
+
state_dict = torch.load(checkpoint_path, map_location=torch.device('cpu'))
|
15 |
model.load_state_dict(state_dict)
|
16 |
|
17 |
infer_tfms = tfms.A.Adapter([*tfms.A.resize_and_pad(384),tfms.A.Normalize()])
|