Skip to content

Commit

Permalink
Bugfix: load checkpoint also if "model_state_dict" is not a key
Browse files Browse the repository at this point in the history
  • Loading branch information
funkey committed Sep 3, 2023
1 parent 8f8b6aa commit 0c13f37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gunpowder/torch/nodes/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def start(self):
if "model_state_dict" in checkpoint:
self.model.load_state_dict(checkpoint["model_state_dict"])
else:
self.model.load_state_dict()
self.model.load_state_dict(checkpoint)

def predict(self, batch, request):
inputs = self.get_inputs(batch)
Expand Down

0 comments on commit 0c13f37

Please sign in to comment.