diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-12-11 11:02:18 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-12-11 11:15:16 -0800 |
commit | 1c46590d8b1431805e15e35beb98f24fe0a9dae5 (patch) | |
tree | 3b16d5845f03a8a66454a5cf98252d7b7d3710a7 /tensorflow/contrib/metrics | |
parent | 0117c7a9fd9878b6a04f3affbee274cfd41138dd (diff) |
Fix incorrect parameter order in recall_at_precision.
PiperOrigin-RevId: 178642393
Diffstat (limited to 'tensorflow/contrib/metrics')
-rw-r--r-- | tensorflow/contrib/metrics/python/ops/metric_ops.py | 2 | ||||
-rw-r--r-- | tensorflow/contrib/metrics/python/ops/metric_ops_test.py | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tensorflow/contrib/metrics/python/ops/metric_ops.py b/tensorflow/contrib/metrics/python/ops/metric_ops.py index 6b08b749f8..2f27985634 100644 --- a/tensorflow/contrib/metrics/python/ops/metric_ops.py +++ b/tensorflow/contrib/metrics/python/ops/metric_ops.py @@ -2268,7 +2268,7 @@ def recall_at_precision(labels, thresholds = [0.0 - _EPSILON] + thresholds + [1.0 + _EPSILON] values, update_ops = _streaming_confusion_matrix_at_thresholds( - labels, predictions, thresholds, weights) + predictions, labels, thresholds, weights) recall = _compute_recall_at_precision(values['tp'], values['fp'], values['fn'], precision, 'value') diff --git a/tensorflow/contrib/metrics/python/ops/metric_ops_test.py b/tensorflow/contrib/metrics/python/ops/metric_ops_test.py index 7db06609de..f05ae394e6 100644 --- a/tensorflow/contrib/metrics/python/ops/metric_ops_test.py +++ b/tensorflow/contrib/metrics/python/ops/metric_ops_test.py @@ -3162,7 +3162,7 @@ class RecallAtPrecisionTest(test.TestCase): labels = random_ops.random_uniform( (10, 3), maxval=2, dtype=dtypes_lib.int64, seed=2) recall, update_op = metrics.recall_at_precision( - predictions, labels, precision=0.7) + labels, predictions, precision=0.7) with self.test_session() as sess: sess.run(variables.local_variables_initializer()) @@ -3182,7 +3182,7 @@ class RecallAtPrecisionTest(test.TestCase): predictions = constant_op.constant(inputs, dtype=dtypes_lib.float32) labels = constant_op.constant(inputs) recall, update_op = metrics.recall_at_precision( - predictions, labels, precision=1.0) + labels, predictions, precision=1.0) with self.test_session() as sess: sess.run(variables.local_variables_initializer()) @@ -3197,7 +3197,7 @@ class RecallAtPrecisionTest(test.TestCase): predictions_values, dtype=dtypes_lib.float32) labels = constant_op.constant(labels_values) recall, update_op = metrics.recall_at_precision( - predictions, labels, precision=0.8) + labels, predictions, precision=0.8) with self.test_session() as sess: sess.run(variables.local_variables_initializer()) @@ -3212,7 +3212,7 @@ class RecallAtPrecisionTest(test.TestCase): predictions_values, dtype=dtypes_lib.float32) labels = constant_op.constant(labels_values) recall, update_op = metrics.recall_at_precision( - predictions, labels, precision=0.4) + labels, predictions, precision=0.4) with self.test_session() as sess: sess.run(variables.local_variables_initializer()) @@ -3230,7 +3230,7 @@ class RecallAtPrecisionTest(test.TestCase): labels = constant_op.constant(labels_values) weights = constant_op.constant(weights_values) recall, update_op = metrics.recall_at_precision( - predictions, labels, weights=weights, precision=0.4) + labels, predictions, weights=weights, precision=0.4) with self.test_session() as sess: sess.run(variables.local_variables_initializer()) |