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
e46d76a7
Commit
e46d76a7
authored
Jul 06, 2020
by
lucas_miranda
Browse files
Implemented shuffle parameter in preprocessing; shuffled validation data in model_training.py
parent
a3c034cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
source/model_utils.py
View file @
e46d76a7
...
...
@@ -198,11 +198,11 @@ class Gaussian_mixture_overlap(Layer):
locs
=
(
target
[...,
:
self
.
lat_dims
,
k
],)
scales
=
tf
.
keras
.
activations
.
softplus
(
target
[...,
self
.
lat_dims
:,
k
])
dists
.
append
(
tfd
.
BatchReshape
(
tfd
.
MultivariateNormalDiag
(
locs
,
scales
),
[
-
1
]))
dists
.
append
(
tfd
.
BatchReshape
(
tfd
.
MultivariateNormalDiag
(
locs
,
scales
),
[
-
1
])
)
print
(
dists
)
dists
=
[
tf
.
transpose
(
gauss
.
sample
(
self
.
samples
),
[
1
,
0
,
2
])
for
gauss
in
dists
]
print
(
dists
)
if
self
.
metric
==
"mmd"
:
...
...
@@ -215,7 +215,7 @@ class Gaussian_mixture_overlap(Layer):
dtype
=
tf
.
float32
,
)
)
print
(
intercomponent_mmd
)
self
.
add_metric
(
intercomponent_mmd
,
aggregation
=
"mean"
,
name
=
"intercomponent_mmd"
)
...
...
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