Skip to content
Snippets Groups Projects
Commit 91020703 authored by Niclas Steve Eich's avatar Niclas Steve Eich
Browse files

Now working

parent 80140d69
No related branches found
No related tags found
No related merge requests found
......@@ -21,14 +21,16 @@ class MulticlassificationConfusionMatrix(tf.keras.callbacks.Callback):
print(self.data_label.shape)
self.comet_experiment.log_confusion_matrix(y_true=self.data_label,
y_predicted=pred,
labels=self.labels)
labels=self.labels,
title="Confusion Start")
def on_epoch_end(self, epoch, logs=None):
if epoch // self.freq == 0 and epoch != 0:
pred = self.model.predict(x=self.data_x, batch_size=self.batch_size)
self.comet_experiment.log_confusion_matrix(y_true=self.data_label,
y_predicted=pred,
labels=self.labels)
labels=self.labels,
title="Confusion Epoch {}".format(epoch))
def on_train_end(self, logs=None):
......@@ -36,4 +38,5 @@ class MulticlassificationConfusionMatrix(tf.keras.callbacks.Callback):
pred = self.model.predict(x=self.data_x, batch_size=self.batch_size)
self.comet_experiment.log_confusion_matrix(y_true=self.data_label,
y_predicted=pred,
labels=self.labels)
labels=self.labels,
title="Confusion End")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment