diff options
Diffstat (limited to 'tensorflow/python/eager/graph_callable.py')
-rw-r--r-- | tensorflow/python/eager/graph_callable.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tensorflow/python/eager/graph_callable.py b/tensorflow/python/eager/graph_callable.py index ce51d17cfc..a7f1061d18 100644 --- a/tensorflow/python/eager/graph_callable.py +++ b/tensorflow/python/eager/graph_callable.py @@ -247,9 +247,7 @@ def _get_graph_callable_inputs(shape_and_dtypes): ret.append(_get_graph_callable_inputs(x)) else: raise errors.InvalidArgumentError( - None, None, "Expected the argument to @graph_callable to be a " - "(possibly nested) list or tuple of ShapeAndDtype objects, " - "but got an object of type: %s" % type(x)) + None, None, "shape_and_dtypes not ShapeAndDtype, type: %s " % type(x)) return tuple(ret) if isinstance(shape_and_dtypes, tuple) else ret @@ -269,7 +267,7 @@ def _graph_callable_internal(func, shape_and_dtypes): Args: func: The tfe Python function to compile. - shape_and_dtypes: A possibly nested list or tuple of ShapeAndDtype objects. + shape_and_dtypes: A list of type ShapeAndDtype. Raises: ValueError: If any one of func's outputs is not a Tensor. @@ -432,10 +430,9 @@ def graph_callable(shape_and_dtypes): ret = foo(tfe.Tensor(2.0)) # `ret` here now is a Tensor with value 9.0. ``` Args: - shape_and_dtypes: A possibly nested list or tuple of ShapeAndDtype objects - that specifies shape and type information for each of the callable's - arguments. The length of this list must be equal to the number of - arguments accepted by the wrapped function. + shape_and_dtypes: A list of type ShapeAndDtype that specifies shape and type + information for each of the callable's arguments. The length of this list + must be equal to the number of arguments accepted by the wrapped function. Returns: A callable graph object. |