# tf.contrib.metrics.confusion_matrix

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/metrics/python/ops/confusion_matrix_ops.py#L25-L30) |

Deprecated. Use tf.math.confusion_matrix instead.

    tf.contrib.metrics.confusion_matrix(
        labels, predictions, num_classes=None, dtype=tf.dtypes.int32, name=None,
        weights=None
    )