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
a3c034cc
Commit
a3c034cc
authored
Jul 06, 2020
by
lucas_miranda
Browse files
Implemented shuffle parameter in preprocessing; shuffled validation data in model_training.py
parent
5411ea58
Changes
1
Hide whitespace changes
Inline
Side-by-side
source/model_utils.py
View file @
a3c034cc
...
@@ -151,7 +151,7 @@ class MMDiscrepancyLayer(Layer):
...
@@ -151,7 +151,7 @@ class MMDiscrepancyLayer(Layer):
def
call
(
self
,
z
,
**
kwargs
):
def
call
(
self
,
z
,
**
kwargs
):
true_samples
=
self
.
prior
.
sample
(
1
)
true_samples
=
self
.
prior
.
sample
(
1
)
mmd_batch
=
self
.
beta
*
compute_mmd
(
true_samples
,
z
)
mmd_batch
=
self
.
beta
*
compute_mmd
(
[
true_samples
,
z
]
)
self
.
add_loss
(
K
.
mean
(
mmd_batch
),
inputs
=
z
)
self
.
add_loss
(
K
.
mean
(
mmd_batch
),
inputs
=
z
)
self
.
add_metric
(
mmd_batch
,
aggregation
=
"mean"
,
name
=
"mmd"
)
self
.
add_metric
(
mmd_batch
,
aggregation
=
"mean"
,
name
=
"mmd"
)
self
.
add_metric
(
self
.
beta
,
aggregation
=
"mean"
,
name
=
"mmd_rate"
)
self
.
add_metric
(
self
.
beta
,
aggregation
=
"mean"
,
name
=
"mmd_rate"
)
...
...
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