Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lucas Miranda
deepOF
Commits
c9e3b7f6
Commit
c9e3b7f6
authored
Apr 27, 2021
by
lucas_miranda
Browse files
Removed outdated non-variational autoencoder model
parent
a6d9fa9d
Changes
5
Hide whitespace changes
Inline
Side-by-side
deepof/train_model.py
View file @
c9e3b7f6
...
@@ -434,7 +434,6 @@ else:
...
@@ -434,7 +434,6 @@ else:
encoding_size
=
encoding_size
,
encoding_size
=
encoding_size
,
hypertun_trials
=
hypertun_trials
,
hypertun_trials
=
hypertun_trials
,
hpt_type
=
tune
,
hpt_type
=
tune
,
hypermodel
=
hyp
,
k
=
k
,
k
=
k
,
kl_warmup_epochs
=
kl_wu
,
kl_warmup_epochs
=
kl_wu
,
loss
=
loss
,
loss
=
loss
,
...
...
tests/test_build_hypermodels.py
View file @
c9e3b7f6
...
@@ -18,26 +18,13 @@ import tensorflow as tf
...
@@ -18,26 +18,13 @@ import tensorflow as tf
tf
.
config
.
experimental_run_functions_eagerly
(
True
)
tf
.
config
.
experimental_run_functions_eagerly
(
True
)
@
settings
(
deadline
=
None
,
max_examples
=
10
)
@
given
(
input_shape
=
st
.
tuples
(
st
.
integers
(
min_value
=
100
,
max_value
=
1000
),
st
.
integers
(
min_value
=
5
,
max_value
=
15
),
st
.
integers
(
min_value
=
5
,
max_value
=
15
),
)
)
def
test_SEQ_2_SEQ_AE_hypermodel_build
(
input_shape
):
deepof
.
hypermodels
.
SEQ_2_SEQ_AE
(
input_shape
=
input_shape
).
build
(
hp
=
HyperParameters
())
@
settings
(
deadline
=
None
,
max_examples
=
10
)
@
settings
(
deadline
=
None
,
max_examples
=
10
)
@
given
(
@
given
(
encoding_size
=
st
.
integers
(
min_value
=
2
,
max_value
=
16
),
encoding_size
=
st
.
integers
(
min_value
=
2
,
max_value
=
16
),
loss
=
st
.
one_of
(
st
.
just
(
"ELBO"
),
st
.
just
(
"MMD"
),
st
.
just
(
"ELBO+MMD"
)),
loss
=
st
.
one_of
(
st
.
just
(
"ELBO"
),
st
.
just
(
"MMD"
),
st
.
just
(
"ELBO+MMD"
)),
number_of_components
=
st
.
integers
(
min_value
=
1
,
max_value
=
5
),
number_of_components
=
st
.
integers
(
min_value
=
1
,
max_value
=
5
),
)
)
def
test_
SEQ_2_SEQ_
GMVAE_hypermodel_build
(
def
test_GMVAE_hypermodel_build
(
encoding_size
,
encoding_size
,
loss
,
loss
,
number_of_components
,
number_of_components
,
...
...
tests/test_build_models.py
View file @
c9e3b7f6
...
@@ -17,19 +17,6 @@ import tensorflow as tf
...
@@ -17,19 +17,6 @@ import tensorflow as tf
tf
.
config
.
experimental_run_functions_eagerly
(
True
)
tf
.
config
.
experimental_run_functions_eagerly
(
True
)
@
settings
(
deadline
=
None
,
max_examples
=
10
)
@
given
(
input_shape
=
st
.
tuples
(
st
.
integers
(
min_value
=
100
,
max_value
=
1000
),
st
.
integers
(
min_value
=
5
,
max_value
=
15
),
st
.
integers
(
min_value
=
5
,
max_value
=
15
),
)
)
def
test_SEQ_2_SEQ_AE_build
(
input_shape
):
deepof
.
models
.
SEQ_2_SEQ_AE
().
build
(
input_shape
=
input_shape
)
@
settings
(
deadline
=
None
,
max_examples
=
10
)
@
settings
(
deadline
=
None
,
max_examples
=
10
)
@
given
(
@
given
(
loss
=
st
.
one_of
(
st
.
just
(
"ELBO"
),
st
.
just
(
"MMD"
),
st
.
just
(
"ELBO+MMD"
)),
loss
=
st
.
one_of
(
st
.
just
(
"ELBO"
),
st
.
just
(
"MMD"
),
st
.
just
(
"ELBO+MMD"
)),
...
@@ -38,7 +25,7 @@ def test_SEQ_2_SEQ_AE_build(input_shape):
...
@@ -38,7 +25,7 @@ def test_SEQ_2_SEQ_AE_build(input_shape):
montecarlo_kl
=
st
.
integers
(
min_value
=
1
,
max_value
=
10
),
montecarlo_kl
=
st
.
integers
(
min_value
=
1
,
max_value
=
10
),
number_of_components
=
st
.
integers
(
min_value
=
1
,
max_value
=
5
),
number_of_components
=
st
.
integers
(
min_value
=
1
,
max_value
=
5
),
)
)
def
test_
SEQ_2_SEQ_
GMVAE_build
(
def
test_GMVAE_build
(
loss
,
loss
,
kl_warmup_epochs
,
kl_warmup_epochs
,
mmd_warmup_epochs
,
mmd_warmup_epochs
,
...
...
tests/test_model_utils.py
View file @
c9e3b7f6
...
@@ -294,6 +294,5 @@ def test_neighbor_latent_entropy():
...
@@ -294,6 +294,5 @@ def test_neighbor_latent_entropy():
k
=
10
,
k
=
10
,
encoding_dim
=
6
,
encoding_dim
=
6
,
validation_data
=
X
,
validation_data
=
X
,
variational
=
True
,
),
),
)
)
tests/test_train_utils.py
View file @
c9e3b7f6
...
@@ -45,12 +45,10 @@ def test_load_treatments():
...
@@ -45,12 +45,10 @@ def test_load_treatments():
next_sequence_prediction
=
st
.
floats
(
min_value
=
0.0
,
max_value
=
1.0
),
next_sequence_prediction
=
st
.
floats
(
min_value
=
0.0
,
max_value
=
1.0
),
phenotype_prediction
=
st
.
floats
(
min_value
=
0.0
,
max_value
=
1.0
),
phenotype_prediction
=
st
.
floats
(
min_value
=
0.0
,
max_value
=
1.0
),
rule_based_prediction
=
st
.
floats
(
min_value
=
0.0
,
max_value
=
1.0
),
rule_based_prediction
=
st
.
floats
(
min_value
=
0.0
,
max_value
=
1.0
),
variational
=
st
.
booleans
(),
)
)
def
test_get_callbacks
(
def
test_get_callbacks
(
X_train
,
X_train
,
batch_size
,
batch_size
,
variational
,
next_sequence_prediction
,
next_sequence_prediction
,
phenotype_prediction
,
phenotype_prediction
,
rule_based_prediction
,
rule_based_prediction
,
...
@@ -59,7 +57,6 @@ def test_get_callbacks(
...
@@ -59,7 +57,6 @@ def test_get_callbacks(
callbacks
=
deepof
.
train_utils
.
get_callbacks
(
callbacks
=
deepof
.
train_utils
.
get_callbacks
(
X_train
=
X_train
,
X_train
=
X_train
,
batch_size
=
batch_size
,
batch_size
=
batch_size
,
variational
=
variational
,
phenotype_prediction
=
phenotype_prediction
,
phenotype_prediction
=
phenotype_prediction
,
next_sequence_prediction
=
next_sequence_prediction
,
next_sequence_prediction
=
next_sequence_prediction
,
rule_based_prediction
=
rule_based_prediction
,
rule_based_prediction
=
rule_based_prediction
,
...
@@ -89,14 +86,12 @@ def test_get_callbacks(
...
@@ -89,14 +86,12 @@ def test_get_callbacks(
next_sequence_prediction
=
st
.
one_of
(
st
.
just
(
0.0
),
st
.
just
(
1.0
)),
next_sequence_prediction
=
st
.
one_of
(
st
.
just
(
0.0
),
st
.
just
(
1.0
)),
phenotype_prediction
=
st
.
one_of
(
st
.
just
(
0.0
),
st
.
just
(
1.0
)),
phenotype_prediction
=
st
.
one_of
(
st
.
just
(
0.0
),
st
.
just
(
1.0
)),
rule_based_prediction
=
st
.
one_of
(
st
.
just
(
0.0
),
st
.
just
(
1.0
)),
rule_based_prediction
=
st
.
one_of
(
st
.
just
(
0.0
),
st
.
just
(
1.0
)),
variational
=
st
.
one_of
(
st
.
just
(
True
),
st
.
just
(
False
)),
)
)
def
test_autoencoder_fitting
(
def
test_autoencoder_fitting
(
loss
,
loss
,
next_sequence_prediction
,
next_sequence_prediction
,
phenotype_prediction
,
phenotype_prediction
,
rule_based_prediction
,
rule_based_prediction
,
variational
,
):
):
X_train
=
np
.
random
.
uniform
(
-
1
,
1
,
[
20
,
5
,
6
])
X_train
=
np
.
random
.
uniform
(
-
1
,
1
,
[
20
,
5
,
6
])
y_train
=
np
.
round
(
np
.
random
.
uniform
(
0
,
1
,
[
20
,
1
]))
y_train
=
np
.
round
(
np
.
random
.
uniform
(
0
,
1
,
[
20
,
1
]))
...
@@ -131,7 +126,6 @@ def test_autoencoder_fitting(
...
@@ -131,7 +126,6 @@ def test_autoencoder_fitting(
next_sequence_prediction
=
next_sequence_prediction
,
next_sequence_prediction
=
next_sequence_prediction
,
phenotype_prediction
=
phenotype_prediction
,
phenotype_prediction
=
phenotype_prediction
,
rule_based_prediction
=
rule_based_prediction
,
rule_based_prediction
=
rule_based_prediction
,
variational
=
variational
,
entropy_samples
=
10
,
entropy_samples
=
10
,
entropy_knn
=
5
,
entropy_knn
=
5
,
)
)
...
@@ -179,7 +173,6 @@ def test_tune_search(
...
@@ -179,7 +173,6 @@ def test_tune_search(
deepof
.
train_utils
.
get_callbacks
(
deepof
.
train_utils
.
get_callbacks
(
X_train
=
X_train
,
X_train
=
X_train
,
batch_size
=
batch_size
,
batch_size
=
batch_size
,
variational
=
(
hypermodel
==
"S2SGMVAE"
),
phenotype_prediction
=
phenotype_prediction
,
phenotype_prediction
=
phenotype_prediction
,
next_sequence_prediction
=
next_sequence_prediction
,
next_sequence_prediction
=
next_sequence_prediction
,
rule_based_prediction
=
rule_based_prediction
,
rule_based_prediction
=
rule_based_prediction
,
...
@@ -202,7 +195,6 @@ def test_tune_search(
...
@@ -202,7 +195,6 @@ def test_tune_search(
encoding_size
=
encoding_size
,
encoding_size
=
encoding_size
,
hpt_type
=
hpt_type
,
hpt_type
=
hpt_type
,
hypertun_trials
=
1
,
hypertun_trials
=
1
,
hypermodel
=
hypermodel
,
k
=
k
,
k
=
k
,
kl_warmup_epochs
=
0
,
kl_warmup_epochs
=
0
,
loss
=
loss
,
loss
=
loss
,
...
...
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