From afb3a322c7084a59cac0a88a0c6d7890dc2528a7 Mon Sep 17 00:00:00 2001 From: lucas_miranda <lucasmiranda42@gmail.com> Date: Mon, 20 Jul 2020 15:53:43 +0200 Subject: [PATCH] Early stopping now uses the overall loss function instead of the intercomponent overlap --- source/model_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/model_utils.py b/source/model_utils.py index 49cc589c..bceaf443 100644 --- a/source/model_utils.py +++ b/source/model_utils.py @@ -275,7 +275,7 @@ class Entropy_regulariser(Layer): Identity layer that adds cluster weight entropy to the loss function """ - def __init__(self, weight=0., *args, **kwargs): + def __init__(self, weight=1., *args, **kwargs): self.weight = weight super(Entropy_regulariser, self).__init__(*args, **kwargs) @@ -292,6 +292,6 @@ class Entropy_regulariser(Layer): # Adds metric that monitors dead neurons in the latent space self.add_metric(entropy, aggregation="mean", name="-weight_entropy") - self.add_loss(self.weight * K.sum(entropy), inputs=[z]) + #self.add_loss(self.weight * K.sum(entropy), inputs=[z]) return z -- GitLab