aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/estimator/canned/head.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/python/estimator/canned/head.py')
-rw-r--r--tensorflow/python/estimator/canned/head.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tensorflow/python/estimator/canned/head.py b/tensorflow/python/estimator/canned/head.py
index c365ea8b4a..efa4bdf598 100644
--- a/tensorflow/python/estimator/canned/head.py
+++ b/tensorflow/python/estimator/canned/head.py
@@ -263,9 +263,12 @@ def _check_dense_labels_match_logits_and_reshape(
if (dim1 is not None) and (dim1 != expected_labels_dimension):
raise ValueError(
'Mismatched label shape. '
- 'Classifier configured with n_classes=%s. Received %s. '
- 'Suggested Fix: check your n_classes argument to the estimator '
- 'and/or the shape of your label.' %
+ 'Expected labels dimension=%s. Received %s. '
+ 'Suggested Fix:'
+ 'If your classifier expects one-hot encoding label,'
+ 'check your n_classes argument to the estimator'
+ 'and/or the shape of your label.'
+ 'Otherwise, check the shape of your label.' %
(expected_labels_dimension, dim1))
expected_labels_shape = array_ops.concat(
[logits_shape[:-1], [expected_labels_dimension]], axis=0)