From cc3c37f767009a849c16fce70345e3812ff772a0 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Tue, 23 Nov 2021 16:30:59 -0600 Subject: [PATCH] minor --- modules/deeplearning/icing_cnn.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/deeplearning/icing_cnn.py b/modules/deeplearning/icing_cnn.py index 0c04b7cd..f0b00b83 100644 --- a/modules/deeplearning/icing_cnn.py +++ b/modules/deeplearning/icing_cnn.py @@ -872,12 +872,13 @@ class IcingIntensityNN: tst_loss = self.test_loss.result().numpy() if tst_loss < best_test_loss: best_test_loss = tst_loss - best_test_acc = self.test_accuracy.result().numpy() - best_test_recall = self.test_recall.result().numpy() - best_test_precision = self.test_precision.result().numpy() - best_test_auc = self.test_auc.result().numpy() - best_test_f1 = f1.numpy() - best_test_mcc = mcc.numpy() + if NumClasses == 2: + best_test_acc = self.test_accuracy.result().numpy() + best_test_recall = self.test_recall.result().numpy() + best_test_precision = self.test_precision.result().numpy() + best_test_auc = self.test_auc.result().numpy() + best_test_f1 = f1.numpy() + best_test_mcc = mcc.numpy() ckpt_manager.save() -- GitLab