Spaces:
Sleeping
Sleeping
Commit ·
1a8dbe7
1
Parent(s): c1a4773
final fix
Browse files
app.py
CHANGED
|
@@ -28,7 +28,7 @@ def get_densenet121_mnist():
|
|
| 28 |
# =========================
|
| 29 |
def load_model():
|
| 30 |
model = get_densenet121_mnist()
|
| 31 |
-
state_dict = torch.load("
|
| 32 |
model.load_state_dict(state_dict, strict=True) # strict=True since arch matches exactly
|
| 33 |
model.eval()
|
| 34 |
return model
|
|
|
|
| 28 |
# =========================
|
| 29 |
def load_model():
|
| 30 |
model = get_densenet121_mnist()
|
| 31 |
+
state_dict = torch.load("best_densenet_mnist.pth", map_location="cpu")
|
| 32 |
model.load_state_dict(state_dict, strict=True) # strict=True since arch matches exactly
|
| 33 |
model.eval()
|
| 34 |
return model
|