oucgc1996 commited on
Commit
cf0d6b6
1 Parent(s): 1a8df8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -48,7 +48,7 @@ class MyModel(nn.Module):
48
  return torch.softmax(output_feature,dim=1)
49
 
50
  model = MyModel()
51
- model.load_state_dict(torch.load("best_model.pth", map_location=torch.device('cpu')))
52
  model = model.to(device)
53
  model.eval()
54
 
 
48
  return torch.softmax(output_feature,dim=1)
49
 
50
  model = MyModel()
51
+ model.load_state_dict(torch.load("best_model.pth", map_location=torch.device('cpu')), strict=False)
52
  model = model.to(device)
53
  model.eval()
54