Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ from resnet import ResNet18
|
|
9 |
import gradio as gr
|
10 |
|
11 |
model = ResNet18()
|
12 |
-
model.load_state_dict(torch.load("
|
13 |
|
14 |
inv_normalize = transforms.Normalize(
|
15 |
mean=[-0.50/0.23, -0.50/0.23, -0.50/0.23],
|
|
|
9 |
import gradio as gr
|
10 |
|
11 |
model = ResNet18()
|
12 |
+
model.load_state_dict(torch.load("cifar10_saved_model.pth", map_location=torch.device('cpu')), strict=False)
|
13 |
|
14 |
inv_normalize = transforms.Normalize(
|
15 |
mean=[-0.50/0.23, -0.50/0.23, -0.50/0.23],
|