From 3c08b43159e4bd1e587170a707f44fbea77239d1 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Fri, 11 Nov 2016 17:18:07 -0800 Subject: Docstring example and formatting updates Change: 138936680 --- .../contrib/learn/python/learn/estimators/tensor_signature.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tensorflow/contrib/learn/python/learn/estimators/tensor_signature.py b/tensorflow/contrib/learn/python/learn/estimators/tensor_signature.py index 693581dc18..a120bc6cc3 100644 --- a/tensorflow/contrib/learn/python/learn/estimators/tensor_signature.py +++ b/tensorflow/contrib/learn/python/learn/estimators/tensor_signature.py @@ -35,6 +35,17 @@ class TensorSignature(collections.namedtuple( Useful to check compatibility of tensors. + Example: + + ```python + examples = tf.placeholder(...) + inputs = {'a': var_a, 'b': var_b} + signatures = tensor_signature.create_signatures(inputs) + result = tensor_signature.create_example_parser_from_signatures( + signatures, examples) + self.assertTrue(tensor_signature.tensors_compatible(result, signatures)) + ``` + Attributes: dtype: `DType` object. shape: `TensorShape` object. -- cgit v1.2.3