Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ def dice_metric(y_pred, y_true):
|
|
25 |
|
26 |
def focal_loss(predict, true):
|
27 |
error = tf.keras.losses.binary_crossentropy(predict, true)
|
28 |
-
pt = tf.exp(
|
29 |
focal_loss_ = (1 - pt) ** 2 * error
|
30 |
return dice_metric(predict, true) + (1*tf.reduce_mean(focal_loss_))
|
31 |
|
|
|
25 |
|
26 |
def focal_loss(predict, true):
|
27 |
error = tf.keras.losses.binary_crossentropy(predict, true)
|
28 |
+
pt = tf.exp(error)
|
29 |
focal_loss_ = (1 - pt) ** 2 * error
|
30 |
return dice_metric(predict, true) + (1*tf.reduce_mean(focal_loss_))
|
31 |
|