Skip to content

Commit

Permalink
set best_model's weight-path-file-name
Browse files Browse the repository at this point in the history
  • Loading branch information
OuyangWenyu committed Sep 18, 2024
1 parent 65bbd1a commit c004952
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion torchhydro/trainers/resulter.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def chosen_trained_epoch(self):
if model_loader["load_way"] == "specified":
epoch_name = str(model_loader["test_epoch"])
elif model_loader["load_way"] == "best":
epoch_name = "best"
# NOTE: TO make it consistent with the name in case of model_loader["load_way"] == "pth", the name have to be "best_model.pth"
epoch_name = "best_model.pth"
elif model_loader["load_way"] == "latest":
epoch_name = str(self.cfgs["training_cfgs"]["epochs"])
elif model_loader["load_way"] == "pth":
Expand Down

0 comments on commit c004952

Please sign in to comment.