updated model load code
Browse files
app.py
CHANGED
@@ -9,6 +9,8 @@ from custom_resnet import Net
|
|
9 |
|
10 |
# model = Net('batch')
|
11 |
model = torch.load("model.pth", map_location=torch.device('cpu'))
|
|
|
|
|
12 |
|
13 |
classes = ('plane', 'car', 'bird', 'cat', 'deer',
|
14 |
'dog', 'frog', 'horse', 'ship', 'truck')
|
|
|
9 |
|
10 |
# model = Net('batch')
|
11 |
model = torch.load("model.pth", map_location=torch.device('cpu'))
|
12 |
+
model.eval()
|
13 |
+
model.to(torch.device('cpu'))
|
14 |
|
15 |
classes = ('plane', 'car', 'bird', 'cat', 'deer',
|
16 |
'dog', 'frog', 'horse', 'ship', 'truck')
|