Skip to content
Snippets Groups Projects
Commit ab55fbf2 authored by Lucas Miranda's avatar Lucas Miranda
Browse files

Added CustomStopper class to train_utils.py, to start early stopping only after annealing is over

parent b1f7583a
No related branches found
No related tags found
No related merge requests found
Pipeline #89081 failed
......@@ -504,8 +504,8 @@ if not tune:
os.path.join(
output_path,
"trained_weights",
"GMVAE_loss={}_encoding={}_run_{}_final_weights.h5".format(
loss, encoding_size, run
"GMVAE_loss={}_encoding={}_k={}_run_{}_final_weights.h5".format(
loss, encoding_size, k, run
),
)
)
......
......@@ -99,17 +99,14 @@ def get_callbacks(
- cp_callback: for checkpoint saving,
- onecycle: for learning rate scheduling"""
run_ID = "{}{}{}{}{}_{}".format(
run_ID = "{}{}{}{}{}{}_{}".format(
("GMVAE" if variational else "AE"),
("P" if predictor > 0 and variational else ""),
("_Pheno" if phenotype_class > 0 else ""),
("_loss={}".format(loss) if variational else ""),
(
"_{}={}".format(list(logparam.keys())[0], list(logparam.values())[0])
if logparam is not None
else ""
),
datetime.now().strftime("%Y%m%d-%H%M%S"),
("_encoding={}".format(logparam["encoding"])),
("_k={}".format(logparam["k"])),
(datetime.now().strftime("%Y%m%d-%H%M%S")),
)
log_dir = os.path.abspath(os.path.join(outpath, "fit", run_ID))
......
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