Skip to content

Commit abac7f5

Browse files
Bug fix.
1 parent 1027252 commit abac7f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tensorflow_advanced_segmentation_models/base/functional.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def precision(y_true, y_pred, class_weights=1., smooth=1e-5, threshold=None):
6161
fp = K.sum(y_pred, axis=axes) - tp
6262

6363
score = (tp + smooth) / (tp + fp + smooth)
64-
score = average(sccore, class_weights)
64+
score = average(score, class_weights)
6565

6666
return score
6767

@@ -74,7 +74,7 @@ def recall(y_true, y_pred, class_weights=1., smooth=1e-5, threshold=None):
7474
fn = K.sum(y_true, axis=axes) - tp
7575

7676
score = (tp + smooth) / (tp + fn + smooth)
77-
score = average(sccore, class_weights)
77+
score = average(score, class_weights)
7878

7979
return score
8080

@@ -153,4 +153,4 @@ def combo(y_true, y_pred, alpha=0.5, beta=1.0, ce_ratio=0.5, class_weights=1., s
153153
combo = (ce_ratio * ce) - ((1 - ce_ratio) * dice)
154154
loss = average(combo, class_weights)
155155

156-
return loss
156+
return loss

0 commit comments

Comments
 (0)