joheras commited on
Commit
159fe1d
1 Parent(s): a6c0dce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -3,7 +3,7 @@ from icevision.all import *
3
 
4
  class_map = ClassMap(['disk'])
5
  model = models.torchvision.faster_rcnn.model(backbone=models.torchvision.faster_rcnn.backbones.resnet18_fpn(pretrained=True),num_classes=len(class_map))
6
- state_dict = torch.load('fasterRCNNDisc.pth')
7
  model.load_state_dict(state_dict)
8
 
9
  infer_tfms = tfms.A.Adapter([*tfms.A.resize_and_pad(384),tfms.A.Normalize()])
 
3
 
4
  class_map = ClassMap(['disk'])
5
  model = models.torchvision.faster_rcnn.model(backbone=models.torchvision.faster_rcnn.backbones.resnet18_fpn(pretrained=True),num_classes=len(class_map))
6
+ state_dict = torch.load('fasterRCNNDisc.pth',map_location=torch.device('cpu'))
7
  model.load_state_dict(state_dict)
8
 
9
  infer_tfms = tfms.A.Adapter([*tfms.A.resize_and_pad(384),tfms.A.Normalize()])