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 a695715 commit 17ec84c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmtb/confusion_matrix_tensorboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ def on_epoch_begin(self, epoch, logs):

fig, ax = plt.subplots(figsize=(self.plot_size, self.plot_size))
cm_train_plot = sklearn.metrics.ConfusionMatrixDisplay(confusion_matrix=cm_train,
display_labels=label_names).plot(cmap="Blues", ax=ax)
display_labels=self.label_names).plot(cmap="Blues", ax=ax)
self.train_images = plot_to_image(cm_train_plot)

fig, ax = plt.subplots(figsize=(self.plot_size, self.plot_size))
cm_val_plot = sklearn.metrics.ConfusionMatrixDisplay(confusion_matrix=cm_val,
display_labels=label_names).plot(cmap="Blues", ax=ax)
display_labels=self.label_names).plot(cmap="Blues", ax=ax)
self.val_images = plot_to_image(cm_val_plot)

file_writer = tf.summary.create_file_writer(self.path_tensorboard + "/" + self.run_name)
Expand Down Expand Up @@ -125,12 +125,12 @@ def on_train_end(self, logs):

fig, ax = plt.subplots(figsize=(self.plot_size, self.plot_size))
cm_train_plot = sklearn.metrics.ConfusionMatrixDisplay(confusion_matrix=cm_train,
display_labels=label_names).plot(cmap="Blues", ax=ax)
display_labels=self.label_names).plot(cmap="Blues", ax=ax)
self.train_images = plot_to_image(cm_train_plot)

fig, ax = plt.subplots(figsize=(self.plot_size, self.plot_size))
cm_val_plot = sklearn.metrics.ConfusionMatrixDisplay(confusion_matrix=cm_val,
display_labels=label_names).plot(cmap="Blues", ax=ax)
display_labels=self.label_names).plot(cmap="Blues", ax=ax)
self.val_images = plot_to_image(cm_val_plot)

file_writer = tf.summary.create_file_writer(self.path_tensorboard + "/" + self.run_name)
Expand Down

0 comments on commit 17ec84c

Please sign in to comment.