mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-12-22 14:15:01 +00:00
celldice: actually do log(cosh())
....just wow.
This commit is contained in:
parent
4a4df380e3
commit
31687da931
1 changed files with 3 additions and 0 deletions
|
@ -38,6 +38,9 @@ class LossCrossEntropyDice(tf.keras.losses.Loss):
|
|||
cel = tf.nn.sigmoid_cross_entropy_with_logits(y_true, y_pred)
|
||||
dice = dice_loss(y_true, y_pred)
|
||||
|
||||
if self.param_log_cosh:
|
||||
dice = tf.math.log(tf.math.cosh(dice))
|
||||
|
||||
o = cel + dice
|
||||
return tf.reduce_mean(o)
|
||||
|
||||
|
|
Loading…
Reference in a new issue