@@ -47,10 +47,10 @@ class MultiLabelConfusionMatrix(Metric):
4747 - true positives for class i in M(1,1)
4848
4949 Usage:
50-
51- >>> y_true = tf.constant([[1, 0, 1], [0, 1, 0]], dtype=tf.int32)
50+
51+ >>> y_true = tf.constant([[1, 0, 1], [0, 1, 0]], dtype=tf.int32)
5252 >>> y_pred = tf.constant([[1, 0, 0],[0, 1, 1]], dtype=tf.int32)
53- >>> output1 = tfa.metrics.MultiLabelConfusionMatrix(num_classes=3)
53+ >>> output1 = tfa.metrics.MultiLabelConfusionMatrix(num_classes=3)
5454 >>> output1.update_state(y_true, y_pred)
5555 >>> output1.result()
5656 <tf.Tensor: shape=(3, 2, 2), dtype=float32, numpy=
@@ -62,10 +62,10 @@ class MultiLabelConfusionMatrix(Metric):
6262 <BLANKLINE>
6363 [[0., 1.],
6464 [1., 0.]]], dtype=float32)>
65- >>> y_true = tf.constant([[1, 0, 0], [0, 1, 0]], dtype=tf.int32)
66- >>> y_pred = tf.constant([[1, 0, 0],[0, 0, 1]], dtype=tf.int32)
67- >>> output2 = tfa.metrics.MultiLabelConfusionMatrix(num_classes=3)
68- >>> output2.update_state(y_true, y_pred)
65+ >>> y_true = tf.constant([[1, 0, 0], [0, 1, 0]], dtype=tf.int32)
66+ >>> y_pred = tf.constant([[1, 0, 0],[0, 0, 1]], dtype=tf.int32)
67+ >>> output2 = tfa.metrics.MultiLabelConfusionMatrix(num_classes=3)
68+ >>> output2.update_state(y_true, y_pred)
6969 >>> output2.result()
7070 <tf.Tensor: shape=(3, 2, 2), dtype=float32, numpy=
7171 array([[[1., 0.],
0 commit comments