fengruilin commited on
Commit
b089015
·
verified ·
1 Parent(s): 94f952d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -22,7 +22,7 @@ class MyCarClassifier(torch.nn.Module):
22
  # 2. Load model weights
23
  # --------------------------
24
  model = MyCarClassifier()
25
- model.load_state_dict(torch.load("best_stanford_cars_transfer_model.pth", map_location="cpu"))
26
  model.eval() # important for inference
27
 
28
  # --------------------------
 
22
  # 2. Load model weights
23
  # --------------------------
24
  model = MyCarClassifier()
25
+ model.load_state_dict(torch.load("best_stanford_cars_transfer_model.pth", map_location="cpu"), strict=False)
26
  model.eval() # important for inference
27
 
28
  # --------------------------