venkyyuvy commited on
Commit
3cb2ba0
·
1 Parent(s): 7e9b1a3

map_location to cpu

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -12,7 +12,7 @@ from matplotlib import pyplot as plt
12
 
13
 
14
  resnet_18_model = ResNet18()
15
- resnet_18_model.load_state_dict(torch.load('resnet18.pth'))
16
  resnet_18_model.eval()
17
 
18
  classes = ('plane', 'car', 'bird', 'cat', 'deer',
 
12
 
13
 
14
  resnet_18_model = ResNet18()
15
+ resnet_18_model.load_state_dict(torch.load('resnet18.pth', map_location='cpu'))
16
  resnet_18_model.eval()
17
 
18
  classes = ('plane', 'car', 'bird', 'cat', 'deer',