Skip to content

Instantly share code, notes, and snippets.

@doleron
Created April 9, 2023 12:30
Show Gist options
  • Save doleron/143d1940581bcd6188f102ee2bda6710 to your computer and use it in GitHub Desktop.
Save doleron/143d1940581bcd6188f102ee2bda6710 to your computer and use it in GitHub Desktop.
import numpy as np
y_pred_test = model.predict(validation_ds)
y_pred_int = tf.cast(tf.math.less(y_pred_test, 0.5), tf.int32)
y_true = np.concatenate([y for x, y in validation_ds], axis=0)
tf.math.confusion_matrix(y_true, y_pred_int)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment