1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-18 19:50:17 +01:00

summing head losses instead of taking the mean (#98)

This commit is contained in:
Gal Leibovich
2018-11-18 12:20:00 +02:00
committed by Gal Novik
parent 5b11fa5656
commit 449bcfb4e1

View File

@@ -280,7 +280,7 @@ class GeneralTensorFlowNetwork(TensorFlowArchitecture):
# Losses # Losses
self.losses = tf.losses.get_losses(self.full_name) self.losses = tf.losses.get_losses(self.full_name)
self.losses += tf.losses.get_regularization_losses(self.full_name) self.losses += tf.losses.get_regularization_losses(self.full_name)
self.total_loss = tf.losses.compute_weighted_loss(self.losses, scope=self.full_name) self.total_loss = tf.reduce_sum(self.losses)
# tf.summary.scalar('total_loss', self.total_loss) # tf.summary.scalar('total_loss', self.total_loss)
# Learning rate # Learning rate