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
d05538b2
Commit
d05538b2
authored
Jul 04, 2020
by
lucas_miranda
Browse files
Implemented shuffle parameter in preprocessing; shuffled validation data in model_training.py
parent
d908c12d
Changes
1
Hide whitespace changes
Inline
Side-by-side
source/model_utils.py
View file @
d05538b2
...
...
@@ -171,6 +171,7 @@ class Latent_space_control(Layer):
# Adds Silhouette score controling overlap between clusters
hard_labels
=
tf
.
math
.
argmax
(
z_cat
,
axis
=
1
)
silhouette
=
tf
.
numpy_function
(
silhouette_score
,
[
z
,
hard_labels
],
tf
.
float32
)
self
.
add_loss
(
-
K
.
mean
(
silhouette
),
inputs
=
[
z
,
hard_labels
])
self
.
add_metric
(
silhouette
,
aggregation
=
"mean"
,
name
=
"silhouette"
)
return
z
Write
Preview
Supports
Markdown
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