Commit c1d1d84f authored by lucas_miranda's avatar lucas_miranda
Browse files

Implemented 1 cycle learning rate schedule

parent 9f758582
......@@ -335,9 +335,7 @@ class Entropy_regulariser(Layer):
def call(self, z, **kwargs):
entropy = K.sum(
tf.multiply(z, tf.where(~tf.math.is_inf(K.log(z)), K.log(z), 0)), axis=1
)
entropy = K.sum(tf.multiply(z + 1e-5, tf.math.log(z) + 1e-5), axis=1)
# Adds metric that monitors dead neurons in the latent space
self.add_metric(entropy, aggregation="mean", name="-weight_entropy")
......
Markdown is supported
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