sanket03 commited on
Commit
54867b6
·
1 Parent(s): 8a8f5ab

updated model load code

Browse files
Files changed (1) hide show
  1. app.py +2 -0
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')