hamsteryang commited on
Commit
b8d480c
·
1 Parent(s): ea236cf

update rebuild

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -38,7 +38,7 @@ densenet, densenet_transforms = create_densenet121_model()
38
  # Load saved weights
39
  state_dict = torch.load("FL_global_model.pt", map_location=torch.device("cpu"))
40
  model_weights = state_dict["model"]
41
- densenet.load_state_dict(model_weights,strict=True) # Set strict to True since we now expect it to match
42
 
43
  def predict(img) -> Tuple[Dict, float]:
44
  """Transforms and performs a prediction on img and returns prediction and time taken."""
 
38
  # Load saved weights
39
  state_dict = torch.load("FL_global_model.pt", map_location=torch.device("cpu"))
40
  model_weights = state_dict["model"]
41
+ densenet.load_state_dict(model_weights,strict=False) # Set strict to True since we now expect it to match
42
 
43
  def predict(img) -> Tuple[Dict, float]:
44
  """Transforms and performs a prediction on img and returns prediction and time taken."""