Skip to content

Commit

Permalink
label names
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-francois committed Aug 29, 2022
1 parent 17ec84c commit a7cae11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmtb/confusion_matrix_tensorboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ def on_train_end(self, logs):
epoch = self.epoch + 1
cm_train = np.load(self.cm_dir + "/cm_train_" + str(epoch - 1) + ".npy")

for i in range(len(model.metrics)):
if (model.metrics[i].name == "bal_acc"):
for i in range(len(self.model.metrics)):
if (self.model.metrics[i].name == "bal_acc"):
bal_acc_index = i
break

# create confusion matrix for last val step manually (storing cm when calling reset_state)
model.metrics[bal_acc_index].reset_state()
self.model.metrics[bal_acc_index].reset_state()
cm_val = np.load(self.cm_dir + "/cm_val_" + str(epoch - 1) + ".npy")

if (self.cm_display_percentage):
Expand Down

0 comments on commit a7cae11

Please sign in to comment.