Minor Error type and documentation fix.
authorPetros Mol <pmol@google.com>
Mon, 26 Mar 2018 03:13:13 +0000 (20:13 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Mon, 26 Mar 2018 03:15:27 +0000 (20:15 -0700)
PiperOrigin-RevId: 190411045

tensorflow/python/estimator/canned/head.py

index c9635a9..bb033d3 100644 (file)
@@ -887,11 +887,12 @@ def _binary_logistic_head_with_sigmoid_cross_entropy_loss(
   Raises:
     ValueError: If `thresholds` contains a value outside of `(0, 1)`.
     ValueError: If `loss_reduction` is invalid.
+    TypeError: if `label_vocabulary` has invalid type.
   """
   thresholds = tuple(thresholds) if thresholds else tuple()
   if label_vocabulary is not None and not isinstance(label_vocabulary,
                                                      (list, tuple)):
-    raise ValueError(
+    raise TypeError(
         'label_vocabulary should be a list or tuple. Given type: {}'.format(
             type(label_vocabulary)))