diff options
-rw-r--r-- | tensorflow/contrib/learn/python/learn/estimators/tensor_signature.py | 11 |
1 files changed, 11 insertions, 0 deletions
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. |