diff options
author | ZJaume <jzaragoza@prompsit.com> | 2022-07-05 12:42:28 +0300 |
---|---|---|
committer | ZJaume <jzaragoza@prompsit.com> | 2022-07-05 12:42:28 +0300 |
commit | c591cc7fd78b9c4c17c3814a034bf55d58d7d490 (patch) | |
tree | 523a395770742ca25ba47a6828953599f8886d10 | |
parent | 4afb00e2330581b814977ddcb884aa0f937f24f0 (diff) |
Metrics rename `update_state`
-rw-r--r-- | bicleaner_ai/metrics.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bicleaner_ai/metrics.py b/bicleaner_ai/metrics.py index 08838bd..3a83546 100644 --- a/bicleaner_ai/metrics.py +++ b/bicleaner_ai/metrics.py @@ -64,7 +64,7 @@ class FScore(Metric): result = tf.math.divide_no_nan(q, d) return result[0] if len(self.thresholds) == 1 else result - def reset_states(self): + def reset_state(self): num_thresholds = len(to_list(self.thresholds)) K.batch_set_value( [(v, np.zeros((num_thresholds,))) for v in self.variables]) @@ -142,7 +142,7 @@ class MatthewsCorrCoef(Metric): tf.math.sqrt(P * S * (1-S) * (1-P))) return result[0] if len(self.thresholds) == 1 else result - def reset_states(self): + def reset_state(self): num_thresholds = len(to_list(self.thresholds)) K.batch_set_value( [(v, np.zeros((num_thresholds,))) for v in self.variables]) |