Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lucas Miranda
deepOF
Commits
38867e7e
Commit
38867e7e
authored
Apr 23, 2021
by
lucas_miranda
Browse files
Started implementing annealing mode for KL divergence
parent
92ceda65
Changes
3
Show whitespace changes
Inline
Side-by-side
deepof/train_model.py
View file @
38867e7e
...
...
@@ -438,6 +438,8 @@ else:
next_sequence_prediction
=
next_sequence_prediction
,
rule_based_prediction
=
rule_base_prediction
,
loss
=
loss
,
loss_warmup
=
kl_wu
,
warmup_mode
=
kl_annealing_mode
,
X_val
=
(
X_val
if
X_val
.
shape
!=
(
0
,)
else
None
),
input_type
=
input_type
,
cp
=
False
,
...
...
deepof/train_utils.py
View file @
38867e7e
...
...
@@ -73,6 +73,8 @@ def get_callbacks(
next_sequence_prediction
:
float
,
rule_based_prediction
:
float
,
loss
:
str
,
loss_warmup
:
int
=
0
,
warmup_mode
:
str
=
"none"
,
X_val
:
np
.
array
=
None
,
input_type
:
str
=
False
,
cp
:
bool
=
False
,
...
...
@@ -108,6 +110,8 @@ def get_callbacks(
(
"_PhenoPred={}"
.
format
(
phenotype_prediction
)
if
variational
else
""
),
(
"_RuleBasedPred={}"
.
format
(
rule_based_prediction
)
if
variational
else
""
),
(
"_loss={}"
.
format
(
loss
)
if
variational
else
""
),
(
"loss_warmup={}_"
.
format
(
loss_warmup
)),
(
"warmup_mode={}_"
.
format
(
warmup_mode
)),
(
"_encoding={}"
.
format
(
logparam
[
"encoding"
])
if
logparam
is
not
None
else
""
),
(
"_k={}"
.
format
(
logparam
[
"k"
])
if
logparam
is
not
None
else
""
),
(
"_latreg={}"
.
format
(
latreg
)),
...
...
deepof_experiments.smk
View file @
38867e7e
...
...
@@ -157,7 +157,7 @@ rule train_models:
"--loss {wildcards.loss} "
"--kl-annealing-mode {wildcards.warmup_mode} "
"--kl-warmup {wildcards.warmup} "
"--mmd-annealing-mode
sigmoid
"
"--mmd-annealing-mode
{wildcards.warmup_mode}
"
"--mmd-warmup {wildcards.warmup} "
"--montecarlo-kl 10 "
"--encoding-size {wildcards.encs} "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment