Skip to content
Snippets Groups Projects
Commit 3029bacb authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[script.experiment] Use, preferably, the model with lowest validation error

parent 4909ede1
No related branches found
No related tags found
No related merge requests found
......@@ -326,7 +326,11 @@ def experiment(
from .analyze import analyze
model_file = os.path.join(train_output_folder, "model_final.pth")
# preferably, we use the best model on the validation set
# otherwise, we get the last saved model
model_file = os.path.join(train_output_folder, "model_lowest_valid_loss.pth")
if not os.path.exists(model_file):
model_file = os.path.join(train_output_folder, "model_final.pth")
ctx.invoke(
analyze,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment