Commit ad52fd4d authored by lucas_miranda's avatar lucas_miranda
Browse files

Added latent regularization control to deepof.data.coordinates.deep_unsupervised_embedding()

parent 89a217f8
......@@ -23,19 +23,19 @@ pheno_weights = [0.01, 0.1, 0.25, 0.5, 1.0, 2.0, 4.0, 10.0, 100.0]
rule deepof_experiments:
input:
# expand( "/psycl/g/mpsstatgen/lucas/DLC/DLC_autoencoders/DeepOF/deepof/logs/hyperparameter_tuning/trained_weights/"
# "GMVAE_loss={loss}_encoding=2_run_1_final_weights.h5",
# loss=losses,
# )
expand(
"/psycl/g/mpsstatgen/lucas/DLC/DLC_autoencoders/DeepOF/deepof/logs/latent_regularization_experiments/trained_weights/"
"GMVAE_loss={loss}_encoding={encs}_k={k}_latreg={latreg}_final_weights.h5",
loss=losses,
encs=encodings,
k=cluster_numbers,
latreg=latent_reg,
expand( "/psycl/g/mpsstatgen/lucas/DLC/DLC_autoencoders/DeepOF/deepof/logs/hyperparameter_tuning/trained_weights/"
"GMVAE_loss={loss}_encoding=4_run_1_final_weights.h5",
loss=losses,
)
# expand(
# "/psycl/g/mpsstatgen/lucas/DLC/DLC_autoencoders/DeepOF/deepof/logs/latent_regularization_experiments/trained_weights/"
# "GMVAE_loss={loss}_encoding={encs}_k={k}_latreg={latreg}_final_weights.h5",
# loss=losses,
# encs=encodings,
# k=cluster_numbers,
# latreg=latent_reg,
# )
# expand(
# "/psycl/g/mpsstatgen/lucas/DLC/DLC_autoencoders/DeepOF/deepof/logs/pheno_classification_experiments/trained_weights/"
# "GMVAE_loss={loss}_encoding={encs}_k={k}_pheno={phenos}_run_1_final_weights.h5",
# loss=losses,
......@@ -45,63 +45,63 @@ rule deepof_experiments:
# ),
# rule coarse_hyperparameter_tuning:
# input:
# data_path="/psycl/g/mpsstatgen/lucas/DLC/DLC_models/deepof_single_topview/",
# output:
# trained_models=os.path.join(
# outpath,
# "hyperparameter_tuning/trained_weights/GMVAE_loss={loss}_encoding=2_run_1_final_weights.h5",
# ),
# shell:
# "pipenv run python -m deepof.train_model "
# "--train-path {input.data_path} "
# "--val-num 25 "
# "--components 15 "
# "--input-type coords "
# "--predictor 0 "
# "--phenotype-classifier 0 "
# "--variational True "
# "--loss {wildcards.loss} "
# "--kl-warmup 20 "
# "--mmd-warmup 0 "
# "--encoding-size 2 "
# "--batch-size 256 "
# "--window-size 24 "
# "--window-step 12 "
# "--output-path {outpath}coarse_hyperparameter_tuning "
# "--hyperparameter-tuning hyperband "
# "--hpt-trials 3"
rule latent_regularization_experiments:
rule coarse_hyperparameter_tuning:
input:
data_path=ancient("/psycl/g/mpsstatgen/lucas/DLC/DLC_models/deepof_single_topview/"),
data_path="/psycl/g/mpsstatgen/lucas/DLC/DLC_models/deepof_single_topview/",
output:
trained_models=os.path.join(
outpath,
"latent_regularization_experiments/trained_weights/GMVAE_loss={loss}_encoding={encs}_k={k}_latreg={latreg}_final_weights.h5",
"hyperparameter_tuning/trained_weights/GMVAE_loss={loss}_encoding=2_run_1_final_weights.h5",
),
shell:
"pipenv run python -m deepof.train_model "
"--train-path {input.data_path} "
"--val-num 5 "
"--components {wildcards.k} "
"--val-num 25 "
"--components 15 "
"--input-type coords "
"--predictor 0 "
"--phenotype-classifier 0 "
"--variational True "
"--latent-reg {wildcards.latreg} "
"--loss {wildcards.loss} "
"--kl-warmup 20 "
"--mmd-warmup 20 "
"--montecarlo-kl 10 "
"--encoding-size {wildcards.encs} "
"--mmd-warmup 0 "
"--encoding-size 4 "
"--batch-size 256 "
"--window-size 24 "
"--window-step 12 "
"--exclude-bodyparts Tail_base,Tail_1,Tail_2,Tail_tip "
"--output-path {outpath}latent_regularization_experiments"
"--output-path {outpath}coarse_hyperparameter_tuning "
"--hyperparameter-tuning hyperband "
"--hpt-trials 3"
# rule latent_regularization_experiments:
# input:
# data_path=ancient("/psycl/g/mpsstatgen/lucas/DLC/DLC_models/deepof_single_topview/"),
# output:
# trained_models=os.path.join(
# outpath,
# "latent_regularization_experiments/trained_weights/GMVAE_loss={loss}_encoding={encs}_k={k}_latreg={latreg}_final_weights.h5",
# ),
# shell:
# "pipenv run python -m deepof.train_model "
# "--train-path {input.data_path} "
# "--val-num 5 "
# "--components {wildcards.k} "
# "--input-type coords "
# "--predictor 0 "
# "--phenotype-classifier 0 "
# "--variational True "
# "--latent-reg {wildcards.latreg} "
# "--loss {wildcards.loss} "
# "--kl-warmup 20 "
# "--mmd-warmup 20 "
# "--montecarlo-kl 10 "
# "--encoding-size {wildcards.encs} "
# "--batch-size 256 "
# "--window-size 24 "
# "--window-step 12 "
# "--exclude-bodyparts Tail_base,Tail_1,Tail_2,Tail_tip "
# "--output-path {outpath}latent_regularization_experiments"
#
#
# rule explore_phenotype_classification:
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment