Clarify return type for defun as zero or more `tf.Tensor`s.
authorTom Hennigan <tomhennigan@google.com>
Mon, 30 Apr 2018 16:31:54 +0000 (09:31 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Mon, 30 Apr 2018 16:35:10 +0000 (09:35 -0700)
PiperOrigin-RevId: 194796621

tensorflow/python/eager/function.py

index 426ee4c..741bd2a 100644 (file)
@@ -716,8 +716,7 @@ def defun(func):
   objects. Non-Tensor python objects are treated as constants, and new function
   definitions are created internally based on their values.
 
-  func must return a tf.Tensor (NOT a Tensor) or a list of tf.Tensor (NOT a
-  Tensor).
+  func must return zero or more `tf.Tensor`.
 
   Control flow constructs (e.g., `if`, `while`) are not yet compatible with
   `defun`.
@@ -748,7 +747,7 @@ def defun(func):
 
   Returns:
      A callable that will execute the compiled function (and return zero
-     or more Tensor objects).
+     or more `tf.Tensor` objects).
   """
   # TODO(apassos): deal with captured global state. Deal with control flow.
   try: