Commit d05538b2 authored by lucas_miranda's avatar lucas_miranda
Browse files

Implemented shuffle parameter in preprocessing; shuffled validation data in

parent d908c12d
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment