aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-10-24 15:23:58 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-10-24 15:27:15 -0700
commit488408c2cefcac507b325da4dd779a9015f7b53f (patch)
treef60d770ba44aa0f502c86c27df1e1752c611465f
parentb20e0b28eec6245ce734d78cdb26dbf2d92c87ba (diff)
Removes unnecessary cast and warning in auc calculation.
PiperOrigin-RevId: 173320547
-rw-r--r--tensorflow/python/estimator/BUILD1
-rw-r--r--tensorflow/python/estimator/canned/head.py4
2 files changed, 0 insertions, 5 deletions
diff --git a/tensorflow/python/estimator/BUILD b/tensorflow/python/estimator/BUILD
index 9670827e41..13fbfe9f53 100644
--- a/tensorflow/python/estimator/BUILD
+++ b/tensorflow/python/estimator/BUILD
@@ -543,7 +543,6 @@ py_library(
"//tensorflow/python:math_ops",
"//tensorflow/python:metrics",
"//tensorflow/python:nn",
- "//tensorflow/python:platform",
"//tensorflow/python:sparse_tensor",
"//tensorflow/python:string_ops",
"//tensorflow/python:summary",
diff --git a/tensorflow/python/estimator/canned/head.py b/tensorflow/python/estimator/canned/head.py
index 1cc82c5055..f26e54ff49 100644
--- a/tensorflow/python/estimator/canned/head.py
+++ b/tensorflow/python/estimator/canned/head.py
@@ -40,7 +40,6 @@ from tensorflow.python.ops import nn
from tensorflow.python.ops import string_ops
from tensorflow.python.ops import weights_broadcast_ops
from tensorflow.python.ops.losses import losses
-from tensorflow.python.platform import tf_logging as logging
from tensorflow.python.saved_model import signature_constants
from tensorflow.python.summary import summary
@@ -314,9 +313,6 @@ def _predictions_mean(predictions, weights=None, name=None):
def _auc(labels, predictions, weights=None, curve='ROC', name=None):
with ops.name_scope(name, 'auc', (predictions, labels, weights)) as scope:
predictions = math_ops.to_float(predictions, name='predictions')
- if labels.dtype.base_dtype != dtypes.bool:
- logging.warning('Casting %s labels to bool.', labels.dtype)
- labels = math_ops.cast(labels, dtypes.bool)
if weights is not None:
weights = weights_broadcast_ops.broadcast_weights(weights, predictions)
return metrics_lib.auc(