Skip to content
GitLab
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
0b0ddad3
Commit
0b0ddad3
authored
Jun 01, 2021
by
lucas_miranda
Browse files
Changed prior initialization
parent
39be1caa
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
deepof/models.py
View file @
0b0ddad3
...
...
@@ -108,13 +108,14 @@ class GMVAE:
),
components_distribution
=
tfd
.
MultivariateNormalDiag
(
loc
=
tf
.
Variable
(
Orthogonal
()(
he_uniform
()(
[
self
.
number_of_components
,
self
.
ENCODING
],
),
name
=
"prior_means"
,
),
scale_diag
=
tfp
.
util
.
TransformedVariable
(
tf
.
ones
([
self
.
number_of_components
,
self
.
ENCODING
]),
tf
.
ones
([
self
.
number_of_components
,
self
.
ENCODING
])
/
self
.
number_of_components
,
tfb
.
Softplus
(),
name
=
"prior_scales"
,
),
...
...
@@ -397,8 +398,7 @@ class GMVAE:
//
2
,
name
=
"cluster_means"
,
activation
=
None
,
kernel_initializer
=
Orthogonal
(),
# An alternative is a constant initializer with a matrix of values
# computed from the labels, we could also initialize the prior this way, and update it every N epochs
kernel_initializer
=
he_uniform
(),
)(
encoder
)
z_gauss_var
=
Dense
(
...
...
supplementary_notebooks/deepof_model_evaluation.ipynb
View file @
0b0ddad3
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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