From 26cc824ace54a081d8097838a70bce145387e997 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Fri, 3 Mar 2023 22:10:49 +0000 Subject: [PATCH] dlr: MeanIoU fixup --- aimodel/src/lib/ai/components/MetricMeanIoU.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aimodel/src/lib/ai/components/MetricMeanIoU.py b/aimodel/src/lib/ai/components/MetricMeanIoU.py index 522a1ae..1fa2947 100644 --- a/aimodel/src/lib/ai/components/MetricMeanIoU.py +++ b/aimodel/src/lib/ai/components/MetricMeanIoU.py @@ -18,6 +18,6 @@ def one_hot_mean_iou(y_true, y_pred, classes=2): y_pred = tf.cast(y_pred, dtype=tf.float32) - iou = tf.keras.metrics.MeanIoU(classes=classes) + iou = tf.keras.metrics.MeanIoU(num_classes=classes) iou.update_state(y_true, y_pred) return iou.result()