diff --git a/modules/deeplearning/icing_cnn.py b/modules/deeplearning/icing_cnn.py index 648c8ab6cd35bc2a64f6ebd593e3d2b4ec319de5..f77ec0e60e59eab75da46910f7e6ed23031832c1 100644 --- a/modules/deeplearning/icing_cnn.py +++ b/modules/deeplearning/icing_cnn.py @@ -617,8 +617,12 @@ class IcingIntensityNN: for mini_batch in ds: self.test_step(mini_batch) - print('loss, acc, auc, recall, precision: ', self.test_loss.result().numpy(), self.test_accuracy.result().numpy(), - self.test_auc.result().numpy(), self.test_f1.result().numpy(), self.test_recall.result().numpy(), self.test_precision.result().numpy()) + recall = self.test_recall.result().numpy() + precsn = self.test_precision.result().numpy() + f1 = 2 * (precsn * recall) / (precsn + recall) + + print('loss, acc, auc, recall, precision, f1: ', self.test_loss.result().numpy(), self.test_accuracy.result().numpy(), + self.test_auc.result().numpy(), self.test_recall.result().numpy(), self.test_precision.result().numpy(), f1) print('--------------------------------------------------') ckpt_manager.save()