aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2016-07-29 16:14:24 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-07-29 17:17:50 -0700
commit2a83828cf3eddf1c31913336cafa20e038559336 (patch)
tree9f867e921282ed61c3f31924751f1078844ed272
parente5a1c6a933eeae54ca69bc9eadf54c51f1614519 (diff)
Create a type alias "Output" for "Tensor". Plan is to
eventually switch to Output and delete Tensor, to match the C++ API. Change: 128863361
-rw-r--r--tensorflow/g3doc/api_docs/python/framework.md5
-rw-r--r--tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.Tensor.md5
-rw-r--r--tensorflow/python/framework/framework_lib.py1
-rw-r--r--tensorflow/python/framework/ops.py9
4 files changed, 17 insertions, 3 deletions
diff --git a/tensorflow/g3doc/api_docs/python/framework.md b/tensorflow/g3doc/api_docs/python/framework.md
index 6108155a0e..9bc9111fc3 100644
--- a/tensorflow/g3doc/api_docs/python/framework.md
+++ b/tensorflow/g3doc/api_docs/python/framework.md
@@ -1105,7 +1105,10 @@ DEPRECATED: Use outputs.
### `class tf.Tensor` {#Tensor}
-Represents a value produced by an `Operation`.
+Represents one of the outputs of an `Operation`.
+
+*Note:* the `Tensor` class will be replaced by `Output` in the future.
+Currently these two are aliases for each other.
A `Tensor` is a symbolic handle to one of the outputs of an
`Operation`. It does not hold the values of that operation's output,
diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.Tensor.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.Tensor.md
index 73af134a7a..6925d9d6d7 100644
--- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.Tensor.md
+++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.Tensor.md
@@ -1,4 +1,7 @@
-Represents a value produced by an `Operation`.
+Represents one of the outputs of an `Operation`.
+
+*Note:* the `Tensor` class will be replaced by `Output` in the future.
+Currently these two are aliases for each other.
A `Tensor` is a symbolic handle to one of the outputs of an
`Operation`. It does not hold the values of that operation's output,
diff --git a/tensorflow/python/framework/framework_lib.py b/tensorflow/python/framework/framework_lib.py
index b06605cf59..3f77187a25 100644
--- a/tensorflow/python/framework/framework_lib.py
+++ b/tensorflow/python/framework/framework_lib.py
@@ -72,6 +72,7 @@ from tensorflow.python.framework.device import DeviceSpec
from tensorflow.python.framework.ops import Graph
from tensorflow.python.framework.ops import Operation
from tensorflow.python.framework.ops import Tensor
+from tensorflow.python.framework.ops import Output
from tensorflow.python.framework.ops import SparseTensor
from tensorflow.python.framework.ops import SparseTensorValue
from tensorflow.python.framework.ops import IndexedSlices
diff --git a/tensorflow/python/framework/ops.py b/tensorflow/python/framework/ops.py
index f89f3d4697..854d46b955 100644
--- a/tensorflow/python/framework/ops.py
+++ b/tensorflow/python/framework/ops.py
@@ -185,7 +185,10 @@ def register_dense_tensor_like_type(tensor_type):
class Tensor(object):
- """Represents a value produced by an `Operation`.
+ """Represents one of the outputs of an `Operation`.
+
+ *Note:* the `Tensor` class will be replaced by `Output` in the future.
+ Currently these two are aliases for each other.
A `Tensor` is a symbolic handle to one of the outputs of an
`Operation`. It does not hold the values of that operation's output,
@@ -556,6 +559,10 @@ class Tensor(object):
return _eval_using_default_session(self, feed_dict, self.graph, session)
+# TODO(josh11b): Switch everyone from "Tensor" to "Output" to match C++ API.
+Output = Tensor
+
+
def _TensorTensorConversionFunction(t, dtype=None, name=None, as_ref=False):
_ = name, as_ref
if dtype and not dtype.is_compatible_with(t.dtype):