From b038cfa70490368c6d6f5dbf6153b5028504d444 Mon Sep 17 00:00:00 2001 From: nmcardoso Date: Wed, 23 Aug 2023 06:02:23 +0000 Subject: [PATCH] deploy: 1937843ff6483c788d5fa4d0376fe0e7c32db0b7 --- _modules/mergernet/estimators/base.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/_modules/mergernet/estimators/base.html b/_modules/mergernet/estimators/base.html index 8282e8bd..dc01ed9f 100644 --- a/_modules/mergernet/estimators/base.html +++ b/_modules/mergernet/estimators/base.html @@ -690,7 +690,11 @@

Source code for mergernet.estimators.base

 
 
[docs] def get_metric(self, metric: str): if metric == 'f1': - return tfa.metrics.F1Score(name='f1', average='weighted') + return tfa.metrics.F1Score( + num_classes=self.dataset.config.n_classes, + name='f1', + average='weighted' + ) # return tf.keras.metrics.F1Score(name='f1', average='weighted') # tf 2.13 elif metric == 'precision': return tf.keras.metrics.Precision(name='precision')