Spaces:
Running
Running
Nunzio commited on
Commit ·
c06c582
1
Parent(s): 5a17bb3
fix
Browse files- model/modelLoading.py +1 -1
model/modelLoading.py
CHANGED
|
@@ -35,7 +35,7 @@ def loadBiSeNet(device: str = 'cpu') -> BiSeNet:
|
|
| 35 |
model (BiSeNet): The loaded BiSeNet model.
|
| 36 |
"""
|
| 37 |
model = BiSeNet(num_classes=19, context_path='resnet18').to(device)
|
| 38 |
-
model.load_state_dict(torch.load('./weights/BiSeNet/weightADV.pth', map_location=device))
|
| 39 |
model.eval()
|
| 40 |
|
| 41 |
return model
|
|
|
|
| 35 |
model (BiSeNet): The loaded BiSeNet model.
|
| 36 |
"""
|
| 37 |
model = BiSeNet(num_classes=19, context_path='resnet18').to(device)
|
| 38 |
+
model.load_state_dict(torch.load('./weights/BiSeNet/weightADV.pth', map_location=device)['model_state_dict'])
|
| 39 |
model.eval()
|
| 40 |
|
| 41 |
return model
|