(logits, labels, num_class)
return tf.confusion_matrix(
      labels=tf.reshape(labels, [-1]),
      predictions=tf.reshape(tf.argmax(logits, -1), [-1]),
      num_classes=num_class)
confusion matrix candies
confusion matrix candies
confusion matrix candies
def confusion_matrix(logits, labels, num_class):
  ''' confusion matrix candies '''
  return tf.confusion_matrix(
      labels=tf.reshape(labels, [-1]),
      predictions=tf.reshape(tf.argmax(logits, -1), [-1]),
      num_classes=num_class)
def confusion_matrix ( logits , labels , num_class ) : return tf . confusion_matrix ( labels = tf . reshape ( labels , [ - 1 ] ) , predictions = tf . reshape ( tf . argmax ( logits , - 1 ) , [ - 1 ] ) , num_classes = num_class )