aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib
diff options
context:
space:
mode:
authorGravatar Jonathan Hseu <jhseu@google.com>2016-11-18 15:43:53 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-11-18 16:04:44 -0800
commit85eeec0d415a1478bbeffc3d4545c795bee64e9f (patch)
tree5d1bb5f7b015f933cdfe8f2d5fc1748d8a7e71f7 /tensorflow/contrib
parent068e2393edb3f0e43a303cf70c4b3c483b2cde23 (diff)
Automated rollback of change 139400135
Change: 139632235
Diffstat (limited to 'tensorflow/contrib')
-rw-r--r--tensorflow/contrib/bayesflow/python/ops/entropy.py42
-rw-r--r--tensorflow/contrib/bayesflow/python/ops/monte_carlo.py38
-rw-r--r--tensorflow/contrib/bayesflow/python/ops/special_math.py8
-rw-r--r--tensorflow/contrib/bayesflow/python/ops/stochastic_gradient_estimators.py14
-rw-r--r--tensorflow/contrib/bayesflow/python/ops/stochastic_graph.py8
-rw-r--r--tensorflow/contrib/bayesflow/python/ops/stochastic_tensor.py6
-rw-r--r--tensorflow/contrib/bayesflow/python/ops/variational_inference.py14
-rw-r--r--tensorflow/contrib/copy_graph/python/util/copy_elements.py2
-rw-r--r--tensorflow/contrib/distributions/python/ops/bernoulli.py8
-rw-r--r--tensorflow/contrib/distributions/python/ops/bijector.py76
-rw-r--r--tensorflow/contrib/distributions/python/ops/categorical.py4
-rw-r--r--tensorflow/contrib/distributions/python/ops/distribution.py66
-rw-r--r--tensorflow/contrib/distributions/python/ops/distribution_util.py44
-rw-r--r--tensorflow/contrib/distributions/python/ops/mvn.py8
-rw-r--r--tensorflow/contrib/distributions/python/ops/operator_pd.py50
-rw-r--r--tensorflow/contrib/distributions/python/ops/operator_pd_identity.py2
-rw-r--r--tensorflow/contrib/distributions/python/ops/operator_pd_vdvt_update.py4
-rw-r--r--tensorflow/contrib/distributions/python/ops/quantized_distribution.py10
-rw-r--r--tensorflow/contrib/distributions/python/ops/shape.py80
-rw-r--r--tensorflow/contrib/distributions/python/ops/wishart.py10
-rw-r--r--tensorflow/contrib/framework/python/framework/checkpoint_utils.py4
-rw-r--r--tensorflow/contrib/framework/python/framework/tensor_util.py16
-rw-r--r--tensorflow/contrib/framework/python/ops/ops.py2
-rw-r--r--tensorflow/contrib/graph_editor/reroute.py22
-rw-r--r--tensorflow/contrib/graph_editor/select.py16
-rw-r--r--tensorflow/contrib/graph_editor/subgraph.py8
-rw-r--r--tensorflow/contrib/graph_editor/transform.py2
-rw-r--r--tensorflow/contrib/graph_editor/util.py24
-rw-r--r--tensorflow/contrib/labeled_tensor/python/ops/core.py2
-rw-r--r--tensorflow/contrib/layers/python/layers/embedding_ops.py10
-rw-r--r--tensorflow/contrib/layers/python/layers/encoders.py8
-rw-r--r--tensorflow/contrib/layers/python/layers/feature_column.py22
-rw-r--r--tensorflow/contrib/layers/python/layers/feature_column_ops.py10
-rw-r--r--tensorflow/contrib/layers/python/layers/layers.py56
-rw-r--r--tensorflow/contrib/layers/python/layers/layers_test.py2
-rw-r--r--tensorflow/contrib/layers/python/layers/optimizers.py10
-rw-r--r--tensorflow/contrib/layers/python/layers/regularizers.py14
-rw-r--r--tensorflow/contrib/layers/python/layers/utils.py8
-rw-r--r--tensorflow/contrib/layers/python/ops/bucketization_op.py4
-rw-r--r--tensorflow/contrib/layers/python/ops/sparse_feature_cross_op.py2
-rw-r--r--tensorflow/contrib/layers/python/ops/sparse_ops.py2
-rw-r--r--tensorflow/contrib/learn/python/learn/dataframe/queues/feeding_functions.py4
-rw-r--r--tensorflow/contrib/learn/python/learn/dataframe/queues/feeding_queue_runner.py2
-rw-r--r--tensorflow/contrib/learn/python/learn/dataframe/tensorflow_dataframe.py2
-rw-r--r--tensorflow/contrib/learn/python/learn/dataframe/transform.py2
-rw-r--r--tensorflow/contrib/learn/python/learn/dataframe/transforms/batch.py4
-rw-r--r--tensorflow/contrib/learn/python/learn/dataframe/transforms/boolean_mask.py2
-rw-r--r--tensorflow/contrib/learn/python/learn/dataframe/transforms/reader_source.py4
-rw-r--r--tensorflow/contrib/learn/python/learn/estimators/classifier.py6
-rw-r--r--tensorflow/contrib/learn/python/learn/estimators/dnn.py16
-rw-r--r--tensorflow/contrib/learn/python/learn/estimators/dnn_linear_combined.py18
-rw-r--r--tensorflow/contrib/learn/python/learn/estimators/dynamic_rnn_estimator.py54
-rw-r--r--tensorflow/contrib/learn/python/learn/estimators/estimator.py50
-rw-r--r--tensorflow/contrib/learn/python/learn/estimators/head.py20
-rw-r--r--tensorflow/contrib/learn/python/learn/estimators/linear.py16
-rw-r--r--tensorflow/contrib/learn/python/learn/estimators/model_fn.py6
-rw-r--r--tensorflow/contrib/learn/python/learn/estimators/random_forest.py2
-rw-r--r--tensorflow/contrib/learn/python/learn/estimators/svm.py6
-rw-r--r--tensorflow/contrib/learn/python/learn/estimators/tensor_signature.py10
-rw-r--r--tensorflow/contrib/learn/python/learn/evaluable.py4
-rw-r--r--tensorflow/contrib/learn/python/learn/graph_actions.py18
-rw-r--r--tensorflow/contrib/learn/python/learn/graph_actions_test.py4
-rw-r--r--tensorflow/contrib/learn/python/learn/learn_io/graph_io.py58
-rw-r--r--tensorflow/contrib/learn/python/learn/metric_spec.py2
-rw-r--r--tensorflow/contrib/learn/python/learn/monitors.py18
-rw-r--r--tensorflow/contrib/learn/python/learn/ops/losses_ops.py2
-rw-r--r--tensorflow/contrib/learn/python/learn/trainable.py4
-rw-r--r--tensorflow/contrib/learn/python/learn/utils/export.py36
-rw-r--r--tensorflow/contrib/linear_optimizer/python/sdca_optimizer.py2
-rw-r--r--tensorflow/contrib/lookup/lookup_ops.py18
-rw-r--r--tensorflow/contrib/losses/python/losses/loss_ops.py38
-rw-r--r--tensorflow/contrib/metrics/__init__.py6
-rw-r--r--tensorflow/contrib/metrics/python/metrics/classification.py8
-rw-r--r--tensorflow/contrib/metrics/python/ops/confusion_matrix_ops.py2
-rw-r--r--tensorflow/contrib/metrics/python/ops/histogram_ops.py14
-rw-r--r--tensorflow/contrib/metrics/python/ops/metric_ops.py270
-rw-r--r--tensorflow/contrib/metrics/python/ops/set_ops.py18
-rw-r--r--tensorflow/contrib/opt/python/training/external_optimizer.py16
-rw-r--r--tensorflow/contrib/rnn/python/ops/lstm_ops.py66
-rw-r--r--tensorflow/contrib/rnn/python/ops/rnn.py2
-rw-r--r--tensorflow/contrib/slim/python/slim/data/data_decoder.py4
-rw-r--r--tensorflow/contrib/slim/python/slim/data/prefetch_queue.py2
-rw-r--r--tensorflow/contrib/slim/python/slim/data/tfexample_decoder.py10
-rw-r--r--tensorflow/contrib/slim/python/slim/learning.py16
-rw-r--r--tensorflow/contrib/slim/python/slim/nets/resnet_utils.py12
-rw-r--r--tensorflow/contrib/slim/python/slim/nets/resnet_v1_test.py4
-rw-r--r--tensorflow/contrib/slim/python/slim/nets/resnet_v2_test.py4
-rw-r--r--tensorflow/contrib/solvers/python/ops/lanczos.py18
-rw-r--r--tensorflow/contrib/solvers/python/ops/least_squares.py12
-rw-r--r--tensorflow/contrib/solvers/python/ops/linear_equations.py12
-rw-r--r--tensorflow/contrib/tensor_forest/data/data_ops.py4
-rw-r--r--tensorflow/contrib/training/python/training/bucket_ops.py4
-rw-r--r--tensorflow/contrib/training/python/training/device_setter.py4
-rw-r--r--tensorflow/contrib/training/python/training/sequence_queueing_state_saver.py66
-rw-r--r--tensorflow/contrib/training/python/training/training.py10
95 files changed, 875 insertions, 875 deletions
diff --git a/tensorflow/contrib/bayesflow/python/ops/entropy.py b/tensorflow/contrib/bayesflow/python/ops/entropy.py
index fea4f6e718..80b35c59d2 100644
--- a/tensorflow/contrib/bayesflow/python/ops/entropy.py
+++ b/tensorflow/contrib/bayesflow/python/ops/entropy.py
@@ -136,15 +136,15 @@ def elbo_ratio(log_p,
<= Log[p(x)]
```
- User supplies either `Output` of samples `z`, or number of samples to draw `n`
+ User supplies either `Tensor` of samples `z`, or number of samples to draw `n`
Args:
- log_p: Callable mapping samples from `q` to `Output`s with
+ log_p: Callable mapping samples from `q` to `Tensors` with
shape broadcastable to `q.batch_shape`.
For example, `log_p` works "just like" `q.log_prob`.
q: `tf.contrib.distributions.Distribution`.
- z: `Output` of samples from `q`, produced by `q.sample_n`.
- n: Integer `Output`. Number of samples to generate if `z` is not provided.
+ z: `Tensor` of samples from `q`, produced by `q.sample_n`.
+ n: Integer `Tensor`. Number of samples to generate if `z` is not provided.
seed: Python integer to seed the random number generator.
form: Either `ELBOForms.analytic_entropy` (use formula for entropy of `q`)
or `ELBOForms.sample` (sample estimate of entropy), or `ELBOForms.default`
@@ -153,7 +153,7 @@ def elbo_ratio(log_p,
name: A name to give this `Op`.
Returns:
- Scalar `Output` holding sample mean KL divergence. `shape` is the batch
+ Scalar `Tensor` holding sample mean KL divergence. `shape` is the batch
shape of `q`, and `dtype` is the same as `q`.
Raises:
@@ -189,12 +189,12 @@ def entropy_shannon(p,
= Entropy[p]
```
- User supplies either `Output` of samples `z`, or number of samples to draw `n`
+ User supplies either `Tensor` of samples `z`, or number of samples to draw `n`
Args:
p: `tf.contrib.distributions.Distribution`
- z: `Output` of samples from `p`, produced by `p.sample_n(n)` for some `n`.
- n: Integer `Output`. Number of samples to generate if `z` is not provided.
+ z: `Tensor` of samples from `p`, produced by `p.sample_n(n)` for some `n`.
+ n: Integer `Tensor`. Number of samples to generate if `z` is not provided.
seed: Python integer to seed the random number generator.
form: Either `ELBOForms.analytic_entropy` (use formula for entropy of `q`)
or `ELBOForms.sample` (sample estimate of entropy), or `ELBOForms.default`
@@ -203,7 +203,7 @@ def entropy_shannon(p,
name: A name to give this `Op`.
Returns:
- An `Output` with same `dtype` as `p`, and shape equal to `p.batch_shape`.
+ A `Tensor` with same `dtype` as `p`, and shape equal to `p.batch_shape`.
Raises:
ValueError: If `form` not handled by this function.
@@ -316,24 +316,24 @@ def renyi_ratio(log_p, q, alpha, z=None, n=None, seed=None, name='renyi_ratio'):
#### Call signature
- User supplies either `Output` of samples `z`, or number of samples to draw `n`
+ User supplies either `Tensor` of samples `z`, or number of samples to draw `n`
Args:
- log_p: Callable mapping samples from `q` to `Output`s with
+ log_p: Callable mapping samples from `q` to `Tensors` with
shape broadcastable to `q.batch_shape`.
For example, `log_p` works "just like" `q.log_prob`.
q: `tf.contrib.distributions.Distribution`.
`float64` `dtype` recommended.
`log_p` and `q` should be supported on the same set.
- alpha: `Output` with shape `q.batch_shape` and values not equal to 1.
- z: `Output` of samples from `q`, produced by `q.sample_n`.
- n: Integer `Output`. The number of samples to use if `z` is not provided.
+ alpha: `Tensor` with shape `q.batch_shape` and values not equal to 1.
+ z: `Tensor` of samples from `q`, produced by `q.sample_n`.
+ n: Integer `Tensor`. The number of samples to use if `z` is not provided.
Note that this can be highly biased for small `n`, see docstring.
seed: Python integer to seed the random number generator.
name: A name to give this `Op`.
Returns:
- renyi_result: The scaled log of sample mean. `Output` with `shape` equal
+ renyi_result: The scaled log of sample mean. `Tensor` with `shape` equal
to batch shape of `q`, and `dtype` = `q.dtype`.
"""
with ops.name_scope(name, values=[alpha, n, z]):
@@ -362,7 +362,7 @@ def renyi_alpha(step,
alpha_min,
alpha_max=0.99999,
name='renyi_alpha'):
- r"""Exponentially decaying `Output` appropriate for Renyi ratios.
+ r"""Exponentially decaying `Tensor` appropriate for Renyi ratios.
When minimizing the Renyi divergence for `0 <= alpha < 1` (or maximizing the
Renyi equivalent of elbo) in high dimensions, it is not uncommon to experience
@@ -382,17 +382,17 @@ def renyi_alpha(step,
```
Args:
- step: Non-negative scalar `Output`. Typically the global step or an
+ step: Non-negative scalar `Tensor`. Typically the global step or an
offset version thereof.
- decay_time: Positive scalar `Output`.
- alpha_min: `float` or `double` `Output`.
+ decay_time: Positive scalar `Tensor`.
+ alpha_min: `float` or `double` `Tensor`.
The minimal, final value of `alpha`, achieved when `step >= decay_time`
- alpha_max: `Output` of same `dtype` as `alpha_min`.
+ alpha_max: `Tensor` of same `dtype` as `alpha_min`.
The maximal, beginning value of `alpha`, achieved when `step == 0`
name: A name to give this `Op`.
Returns:
- alpha: An `Output` of same `dtype` as `alpha_min`.
+ alpha: A `Tensor` of same `dtype` as `alpha_min`.
"""
with ops.name_scope(name, values=[step, decay_time, alpha_min, alpha_max]):
alpha_min = ops.convert_to_tensor(alpha_min, name='alpha_min')
diff --git a/tensorflow/contrib/bayesflow/python/ops/monte_carlo.py b/tensorflow/contrib/bayesflow/python/ops/monte_carlo.py
index dbfa3611ba..9cd2c5aee6 100644
--- a/tensorflow/contrib/bayesflow/python/ops/monte_carlo.py
+++ b/tensorflow/contrib/bayesflow/python/ops/monte_carlo.py
@@ -105,26 +105,26 @@ def expectation_importance_sampler(f,
If `f >= 0`, it is up to 2x more efficient to exponentiate the result of
`expectation_importance_sampler_logspace` applied to `Log[f]`.
- User supplies either `Output` of samples `z`, or number of samples to draw `n`
+ User supplies either `Tensor` of samples `z`, or number of samples to draw `n`
Args:
- f: Callable mapping samples from `sampling_dist_q` to `Output`s with shape
+ f: Callable mapping samples from `sampling_dist_q` to `Tensors` with shape
broadcastable to `q.batch_shape`.
For example, `f` works "just like" `q.log_prob`.
- log_p: Callable mapping samples from `sampling_dist_q` to `Output`s with
+ log_p: Callable mapping samples from `sampling_dist_q` to `Tensors` with
shape broadcastable to `q.batch_shape`.
For example, `log_p` works "just like" `sampling_dist_q.log_prob`.
sampling_dist_q: The sampling distribution.
`tf.contrib.distributions.Distribution`.
`float64` `dtype` recommended.
`log_p` and `q` should be supported on the same set.
- z: `Output` of samples from `q`, produced by `q.sample_n`.
- n: Integer `Output`. Number of samples to generate if `z` is not provided.
+ z: `Tensor` of samples from `q`, produced by `q.sample_n`.
+ n: Integer `Tensor`. Number of samples to generate if `z` is not provided.
seed: Python integer to seed the random number generator.
name: A name to give this `Op`.
Returns:
- The importance sampling estimate. `Output` with `shape` equal
+ The importance sampling estimate. `Tensor` with `shape` equal
to batch shape of `q`, and `dtype` = `q.dtype`.
"""
q = sampling_dist_q
@@ -182,26 +182,26 @@ def expectation_importance_sampler_logspace(
log-space.
- User supplies either `Output` of samples `z`, or number of samples to draw `n`
+ User supplies either `Tensor` of samples `z`, or number of samples to draw `n`
Args:
- log_f: Callable mapping samples from `sampling_dist_q` to `Output`s with
+ log_f: Callable mapping samples from `sampling_dist_q` to `Tensors` with
shape broadcastable to `q.batch_shape`.
For example, `log_f` works "just like" `sampling_dist_q.log_prob`.
- log_p: Callable mapping samples from `sampling_dist_q` to `Output`s with
+ log_p: Callable mapping samples from `sampling_dist_q` to `Tensors` with
shape broadcastable to `q.batch_shape`.
For example, `log_p` works "just like" `q.log_prob`.
sampling_dist_q: The sampling distribution.
`tf.contrib.distributions.Distribution`.
`float64` `dtype` recommended.
`log_p` and `q` should be supported on the same set.
- z: `Output` of samples from `q`, produced by `q.sample_n`.
- n: Integer `Output`. Number of samples to generate if `z` is not provided.
+ z: `Tensor` of samples from `q`, produced by `q.sample_n`.
+ n: Integer `Tensor`. Number of samples to generate if `z` is not provided.
seed: Python integer to seed the random number generator.
name: A name to give this `Op`.
Returns:
- Logarithm of the importance sampling estimate. `Output` with `shape` equal
+ Logarithm of the importance sampling estimate. `Tensor` with `shape` equal
to batch shape of `q`, and `dtype` = `q.dtype`.
"""
q = sampling_dist_q
@@ -215,10 +215,10 @@ def _logspace_mean(log_values):
"""Evaluate `Log[E[values]]` in a stable manner.
Args:
- log_values: `Output` holding `Log[values]`.
+ log_values: `Tensor` holding `Log[values]`.
Returns:
- `Output` of same `dtype` as `log_values`, reduced across dim 0.
+ `Tensor` of same `dtype` as `log_values`, reduced across dim 0.
`Log[Mean[values]]`.
"""
# center = Max[Log[values]], with stop-gradient
@@ -249,18 +249,18 @@ def expectation(f, p, z=None, n=None, seed=None, name='expectation'):
\approx E_p[f(Z)]
```
- User supplies either `Output` of samples `z`, or number of samples to draw `n`
+ User supplies either `Tensor` of samples `z`, or number of samples to draw `n`
Args:
- f: Callable mapping samples from `p` to `Output`s.
+ f: Callable mapping samples from `p` to `Tensors`.
p: `tf.contrib.distributions.Distribution`.
- z: `Output` of samples from `p`, produced by `p.sample_n`.
- n: Integer `Output`. Number of samples to generate if `z` is not provided.
+ z: `Tensor` of samples from `p`, produced by `p.sample_n`.
+ n: Integer `Tensor`. Number of samples to generate if `z` is not provided.
seed: Python integer to seed the random number generator.
name: A name to give this `Op`.
Returns:
- An `Output` with the same `dtype` as `p`.
+ A `Tensor` with the same `dtype` as `p`.
Example:
diff --git a/tensorflow/contrib/bayesflow/python/ops/special_math.py b/tensorflow/contrib/bayesflow/python/ops/special_math.py
index dc3bf067ca..77e7c0e093 100644
--- a/tensorflow/contrib/bayesflow/python/ops/special_math.py
+++ b/tensorflow/contrib/bayesflow/python/ops/special_math.py
@@ -65,11 +65,11 @@ def ndtr(x, name="ndtr"):
```
Args:
- x: `Output` of type `float32`, `float64`.
+ x: `Tensor` of type `float32`, `float64`.
name: Python string. A name for the operation (default="ndtr").
Returns:
- ndtr: `Output` with `dtype=x.dtype`.
+ ndtr: `Tensor` with `dtype=x.dtype`.
Raises:
TypeError: if `x` is not floating-type.
@@ -135,13 +135,13 @@ def log_ndtr(x, series_order=3, name="log_ndtr"):
Args:
- x: `Output` of type `float32`, `float64`.
+ x: `Tensor` of type `float32`, `float64`.
series_order: Positive Python `integer`. Maximum depth to
evaluate the asymptotic expansion. This is the `N` above.
name: Python string. A name for the operation (default="log_ndtr").
Returns:
- log_ndtr: `Output` with `dtype=x.dtype`.
+ log_ndtr: `Tensor` with `dtype=x.dtype`.
Raises:
TypeError: if `x.dtype` is not handled.
diff --git a/tensorflow/contrib/bayesflow/python/ops/stochastic_gradient_estimators.py b/tensorflow/contrib/bayesflow/python/ops/stochastic_gradient_estimators.py
index 6691dfca91..2139419289 100644
--- a/tensorflow/contrib/bayesflow/python/ops/stochastic_gradient_estimators.py
+++ b/tensorflow/contrib/bayesflow/python/ops/stochastic_gradient_estimators.py
@@ -75,13 +75,13 @@ def score_function(stochastic_tensor, value, loss, baseline=None,
Args:
stochastic_tensor: `StochasticTensor` p(x).
- value: `Output` x. Samples from p(x).
- loss: `Output`.
- baseline: `Output` broadcastable to `loss`.
+ value: `Tensor` x. Samples from p(x).
+ loss: `Tensor`.
+ baseline: `Tensor` broadcastable to `loss`.
name: name to prepend ops with.
Returns:
- `Output` `p.log_prob(x) * (loss - b)`. Taking the gradient yields the score
+ `Tensor` `p.log_prob(x) * (loss - b)`. Taking the gradient yields the score
function estimator.
"""
with ops.name_scope(name, values=[value, loss, baseline]):
@@ -103,7 +103,7 @@ def get_score_function_with_advantage(advantage_fn=None,
Args:
advantage_fn: callable that takes the `StochasticTensor` and the
- downstream `loss` and returns an `Output` advantage
+ downstream `loss` and returns a `Tensor` advantage
(e.g. `loss - baseline`).
name: name to prepend ops with.
@@ -125,7 +125,7 @@ def get_score_function_with_constant_baseline(baseline, name="ScoreFunction"):
"""Score function estimator with constant baseline.
Args:
- baseline: `Output` to be subtracted from loss.
+ baseline: `Tensor` to be subtracted from loss.
name: name to prepend ops with.
Returns:
@@ -145,7 +145,7 @@ def get_score_function_with_baseline(baseline_fn=None, name="ScoreFunction"):
Args:
baseline_fn: callable that takes the `StochasticTensor` and the downstream
- `loss` and returns an `Output` baseline to be subtracted from the `loss`.
+ `loss` and returns a `Tensor` baseline to be subtracted from the `loss`.
If None, defaults to `get_mean_baseline`, which is an EMA of the loss.
name: name to prepend ops with.
diff --git a/tensorflow/contrib/bayesflow/python/ops/stochastic_graph.py b/tensorflow/contrib/bayesflow/python/ops/stochastic_graph.py
index 7f2a223605..81c04d8e9b 100644
--- a/tensorflow/contrib/bayesflow/python/ops/stochastic_graph.py
+++ b/tensorflow/contrib/bayesflow/python/ops/stochastic_graph.py
@@ -54,7 +54,7 @@ def _stochastic_dependencies_map(fixed_losses, stochastic_tensors=None):
"""Map stochastic tensors to the fixed losses that depend on them.
Args:
- fixed_losses: a list of `Output`s.
+ fixed_losses: a list of `Tensor`s.
stochastic_tensors: a list of `StochasticTensor`s to map to fixed losses.
If `None`, all `StochasticTensor`s in the graph will be used.
@@ -109,16 +109,16 @@ def surrogate_loss(sample_losses,
dimensionality of 1 or greater. All losses should have the same shape.
stochastic_tensors: a list of `StochasticTensor`s to add loss terms for.
If None, defaults to all `StochasticTensor`s in the graph upstream of
- the `Output`s in `sample_losses`.
+ the `Tensor`s in `sample_losses`.
name: the name with which to prepend created ops.
Returns:
- `Output` loss, which is the sum of `sample_losses` and the
+ `Tensor` loss, which is the sum of `sample_losses` and the
`loss_fn`s returned by the `StochasticTensor`s.
Raises:
TypeError: if `sample_losses` is not a list or tuple, or if its elements
- are not `Output`s.
+ are not `Tensor`s.
ValueError: if any loss in `sample_losses` does not have dimensionality 1
or greater.
"""
diff --git a/tensorflow/contrib/bayesflow/python/ops/stochastic_tensor.py b/tensorflow/contrib/bayesflow/python/ops/stochastic_tensor.py
index e99ef5374e..e52c81740d 100644
--- a/tensorflow/contrib/bayesflow/python/ops/stochastic_tensor.py
+++ b/tensorflow/contrib/bayesflow/python/ops/stochastic_tensor.py
@@ -91,10 +91,10 @@ class BaseStochasticTensor(object):
constant with respect to the input for purposes of the gradient.
Args:
- sample_loss: `Output`, sample loss downstream of this `StochasticTensor`.
+ sample_loss: `Tensor`, sample loss downstream of this `StochasticTensor`.
Returns:
- Either `None` or an `Output`.
+ Either `None` or a `Tensor`.
"""
raise NotImplementedError("surrogate_loss not implemented")
@@ -301,7 +301,7 @@ class StochasticTensor(BaseStochasticTensor):
value type set with the `value_type` context manager will be used.
loss_fn: callable that takes
`(st, st.value(), influenced_loss)`, where
- `st` is this `StochasticTensor`, and returns an `Output` loss. By
+ `st` is this `StochasticTensor`, and returns a `Tensor` loss. By
default, `loss_fn` is the `score_function`, or more precisely, the
integral of the score function, such that when the gradient is taken,
the score function results. See the `stochastic_gradient_estimators`
diff --git a/tensorflow/contrib/bayesflow/python/ops/variational_inference.py b/tensorflow/contrib/bayesflow/python/ops/variational_inference.py
index 6f2b54c9f8..bd8309b56b 100644
--- a/tensorflow/contrib/bayesflow/python/ops/variational_inference.py
+++ b/tensorflow/contrib/bayesflow/python/ops/variational_inference.py
@@ -135,7 +135,7 @@ def elbo(log_likelihood,
e.g. `q(Z) = q(z1)q(z2)q(z3)`.
Args:
- log_likelihood: `Output` log p(x|Z).
+ log_likelihood: `Tensor` log p(x|Z).
variational_with_prior: dict from `StochasticTensor` q(Z) to
`Distribution` p(Z). If `None`, defaults to all `StochasticTensor`
objects upstream of `log_likelihood` with priors registered with
@@ -148,7 +148,7 @@ def elbo(log_likelihood,
name: name to prefix ops with.
Returns:
- `Output` ELBO of the same type and shape as `log_likelihood`.
+ `Tensor` ELBO of the same type and shape as `log_likelihood`.
Raises:
TypeError: if variationals in `variational_with_prior` are not
@@ -181,7 +181,7 @@ def elbo_with_log_joint(log_joint,
Because only the joint is specified, analytic KL is not available.
Args:
- log_joint: `Output` log p(x, Z).
+ log_joint: `Tensor` log p(x, Z).
variational: list of `StochasticTensor` q(Z). If `None`, defaults to all
`StochasticTensor` objects upstream of `log_joint`.
keep_batch_dim: bool. Whether to keep the batch dimension when summing
@@ -192,7 +192,7 @@ def elbo_with_log_joint(log_joint,
name: name to prefix ops with.
Returns:
- `Output` ELBO of the same type and shape as `log_joint`.
+ `Tensor` ELBO of the same type and shape as `log_joint`.
Raises:
TypeError: if variationals in `variational` are not `StochasticTensor`s.
@@ -224,15 +224,15 @@ def _elbo(form, log_likelihood, log_joint, variational_with_prior,
Args:
form: ELBOForms constant. Controls how the ELBO is computed.
- log_likelihood: `Output` log p(x|Z).
- log_joint: `Output` log p(x, Z).
+ log_likelihood: `Tensor` log p(x|Z).
+ log_joint: `Tensor` log p(x, Z).
variational_with_prior: `dict<StochasticTensor, Distribution>`, varational
distributions to prior distributions.
keep_batch_dim: bool. Whether to keep the batch dimension when reducing
the entropy/KL.
Returns:
- ELBO `Output` with same shape and dtype as `log_likelihood`/`log_joint`.
+ ELBO `Tensor` with same shape and dtype as `log_likelihood`/`log_joint`.
"""
ELBOForms.check_form(form)
diff --git a/tensorflow/contrib/copy_graph/python/util/copy_elements.py b/tensorflow/contrib/copy_graph/python/util/copy_elements.py
index 3850d45749..19d67ad490 100644
--- a/tensorflow/contrib/copy_graph/python/util/copy_elements.py
+++ b/tensorflow/contrib/copy_graph/python/util/copy_elements.py
@@ -122,7 +122,7 @@ def copy_op_to_graph(org_instance, to_graph, variables,
The copied `Operation` from `to_graph`.
Raises:
- TypeError: If `org_instance` is not an `Operation` or `Output`.
+ TypeError: If `org_instance` is not an `Operation` or `Tensor`.
"""
#The name of the new instance
diff --git a/tensorflow/contrib/distributions/python/ops/bernoulli.py b/tensorflow/contrib/distributions/python/ops/bernoulli.py
index 79be73aae8..44962a5f1b 100644
--- a/tensorflow/contrib/distributions/python/ops/bernoulli.py
+++ b/tensorflow/contrib/distributions/python/ops/bernoulli.py
@@ -47,12 +47,12 @@ class Bernoulli(distribution.Distribution):
"""Construct Bernoulli distributions.
Args:
- logits: An N-D `Output` representing the log-odds
- of a positive event. Each entry in the `Output` parametrizes
+ logits: An N-D `Tensor` representing the log-odds
+ of a positive event. Each entry in the `Tensor` parametrizes
an independent Bernoulli distribution where the probability of an event
is sigmoid(logits). Only one of `logits` or `p` should be passed in.
- p: An N-D `Output` representing the probability of a positive
- event. Each entry in the `Output` parameterizes an independent
+ p: An N-D `Tensor` representing the probability of a positive
+ event. Each entry in the `Tensor` parameterizes an independent
Bernoulli distribution. Only one of `logits` or `p` should be passed
in.
dtype: dtype for samples.
diff --git a/tensorflow/contrib/distributions/python/ops/bijector.py b/tensorflow/contrib/distributions/python/ops/bijector.py
index ab8b320095..450874caef 100644
--- a/tensorflow/contrib/distributions/python/ops/bijector.py
+++ b/tensorflow/contrib/distributions/python/ops/bijector.py
@@ -90,9 +90,9 @@ class _Mapping(collections.namedtuple("_Mapping",
"""Custom __new__ so namedtuple items have defaults.
Args:
- x: `Output`. Forward.
- y: `Output`. Inverse.
- ildj: `Output`. Inverse log det Jacobian.
+ x: `Tensor`. Forward.
+ y: `Tensor`. Inverse.
+ ildj: `Tensor`. Inverse log det Jacobian.
condition_kwargs: Python dictionary. Extra args supplied to
forward/inverse/etc functions.
@@ -118,9 +118,9 @@ class _Mapping(collections.namedtuple("_Mapping",
"""Returns new _Mapping with args merged with self.
Args:
- x: `Output`. Forward.
- y: `Output`. Inverse.
- ildj: `Output`. Inverse log det Jacobian.
+ x: `Tensor`. Forward.
+ y: `Tensor`. Inverse.
+ ildj: `Tensor`. Inverse log det Jacobian.
condition_kwargs: Python dictionary. Extra args supplied to
forward/inverse/etc functions.
mapping: Instance of _Mapping to merge. Can only be specified if no other
@@ -166,7 +166,7 @@ class Bijector(object):
[diffeomorphism](https://en.wikipedia.org/wiki/Diffeomorphism), i.e., a
bijective, differentiable function. A `Bijector` is used by
`TransformedDistribution` but can be generally used for transforming a
- `Distribution` generated `Output`. A `Bijector` is characterized by three
+ `Distribution` generated `Tensor`. A `Bijector` is characterized by three
operations:
1. Forward Evaluation
@@ -258,11 +258,11 @@ class Bijector(object):
Example of why a `Bijector` needs to understand sample, batch, event
partitioning:
- - Consider the `Exp` `Bijector` applied to an `Output` which has sample,
- batch, and event (S, B, E) shape semantics. Suppose
- the `Output`'s partitioned-shape is `(S=[4], B=[2], E=[3, 3])`.
+ - Consider the `Exp` `Bijector` applied to a `Tensor` which has sample, batch,
+ and event (S, B, E) shape semantics. Suppose
+ the `Tensor`'s partitioned-shape is `(S=[4], B=[2], E=[3, 3])`.
- For `Exp`, the shape of the `Output` returned by `forward` and `inverse` is
+ For `Exp`, the shape of the `Tensor` returned by `forward` and `inverse` is
unchanged, i.e., `[4, 2, 3, 3]`. However the shape returned by
`inverse_log_det_jacobian` is `[4, 2]` because the Jacobian is a reduction
over the event dimensions.
@@ -445,7 +445,7 @@ class Bijector(object):
@property
def dtype(self):
- """dtype of `Output`s transformable by this distribution."""
+ """dtype of `Tensor`s transformable by this distribution."""
return self._dtype
@property
@@ -458,15 +458,15 @@ class Bijector(object):
return input_shape
def forward_event_shape(self, input_shape, name="forward_event_shape"):
- """Shape of a single sample from a single batch as an `int32` 1D `Output`.
+ """Shape of a single sample from a single batch as an `int32` 1D `Tensor`.
Args:
- input_shape: `Output`, `int32` vector indicating event-portion shape
+ input_shape: `Tensor`, `int32` vector indicating event-portion shape
passed into `forward` function.
name: name to give to the op
Returns:
- forward_event_shape: `Output`, `int32` vector indicating event-portion
+ forward_event_shape: `Tensor`, `int32` vector indicating event-portion
shape after applying `forward`.
"""
with self._name_scope(name, [input_shape]):
@@ -498,15 +498,15 @@ class Bijector(object):
return output_shape
def inverse_event_shape(self, output_shape, name="inverse_event_shape"):
- """Shape of a single sample from a single batch as an `int32` 1D `Output`.
+ """Shape of a single sample from a single batch as an `int32` 1D `Tensor`.
Args:
- output_shape: `Output`, `int32` vector indicating event-portion shape
+ output_shape: `Tensor`, `int32` vector indicating event-portion shape
passed into `inverse` function.
name: name to give to the op
Returns:
- inverse_event_shape: `Output`, `int32` vector indicating event-portion
+ inverse_event_shape: `Tensor`, `int32` vector indicating event-portion
shape after applying `inverse`.
"""
with self._name_scope(name, [output_shape]):
@@ -541,12 +541,12 @@ class Bijector(object):
"""Returns the forward `Bijector` evaluation, i.e., X = g(Y).
Args:
- x: `Output`. The input to the "forward" evaluation.
+ x: `Tensor`. The input to the "forward" evaluation.
name: The name to give this op.
**condition_kwargs: Named arguments forwarded to subclass implementation.
Returns:
- `Output`.
+ `Tensor`.
Raises:
TypeError: if `self.dtype` is specified and `x.dtype` is not
@@ -571,12 +571,12 @@ class Bijector(object):
"""Returns the inverse `Bijector` evaluation, i.e., X = g^{-1}(Y).
Args:
- y: `Output`. The input to the "inverse" evaluation.
+ y: `Tensor`. The input to the "inverse" evaluation.
name: The name to give this op.
**condition_kwargs: Named arguments forwarded to subclass implementation.
Returns:
- `Output`.
+ `Tensor`.
Raises:
TypeError: if `self.dtype` is specified and `y.dtype` is not
@@ -623,12 +623,12 @@ class Bijector(object):
Note that `forward_log_det_jacobian` is the negative of this function.
Args:
- y: `Output`. The input to the "inverse" Jacobian evaluation.
+ y: `Tensor`. The input to the "inverse" Jacobian evaluation.
name: The name to give this op.
**condition_kwargs: Named arguments forwarded to subclass implementation.
Returns:
- `Output`.
+ `Tensor`.
Raises:
TypeError: if `self.dtype` is specified and `y.dtype` is not
@@ -679,12 +679,12 @@ class Bijector(object):
See `inverse()`, `inverse_log_det_jacobian()` for more details.
Args:
- y: `Output`. The input to the "inverse" Jacobian evaluation.
+ y: `Tensor`. The input to the "inverse" Jacobian evaluation.
name: The name to give this op.
**condition_kwargs: Named arguments forwarded to subclass implementation.
Returns:
- `Output`.
+ `Tensor`.
Raises:
TypeError: if `self.dtype` is specified and `y.dtype` is not
@@ -733,12 +733,12 @@ class Bijector(object):
"""Returns both the forward_log_det_jacobian.
Args:
- x: `Output`. The input to the "forward" Jacobian evaluation.
+ x: `Tensor`. The input to the "forward" Jacobian evaluation.
name: The name to give this op.
**condition_kwargs: Named arguments forwarded to subclass implementation.
Returns:
- `Output`.
+ `Tensor`.
Raises:
TypeError: if `self.dtype` is specified and `y.dtype` is not
@@ -1189,7 +1189,7 @@ class Exp(Bijector):
"""Instantiates the `Exp` bijector.
Args:
- event_ndims: Scalar `int32` `Output` indicating the number of dimensions
+ event_ndims: Scalar `int32` `Tensor` indicating the number of dimensions
associated with a particular draw from the distribution.
validate_args: `Boolean` indicating whether arguments should be checked
for correctness.
@@ -1279,19 +1279,19 @@ class ScaleAndShift(Bijector):
name="scale_and_shift"):
"""Instantiates the `ScaleAndShift` bijector.
- This `Bijector` is initialized with `scale` and `shift` `Output`s, giving
+ This `Bijector` is initialized with `scale` and `shift` `Tensors`, giving
the forward operation:
```Y = g(X) = matmul(scale, X) + shift```
Args:
- shift: Numeric `Output`.
- scale: Numeric `Output` of same `dtype` as `shift`. If `event_ndims = 0`,
+ shift: Numeric `Tensor`.
+ scale: Numeric `Tensor` of same `dtype` as `shift`. If `event_ndims = 0`,
`scale` is treated like a `1x1` matrix or a batch thereof.
Otherwise, the last two dimensions of `scale` define a matrix.
`scale` must have non-negative diagonal entries. The upper triangular
part of `scale` is ignored, effectively making it lower triangular.
- event_ndims: Scalar `int32` `Output` indicating the number of dimensions
+ event_ndims: Scalar `int32` `Tensor` indicating the number of dimensions
associated with a particular draw from the distribution. Must be 0 or 1
validate_args: `Boolean` indicating whether arguments should be checked
for correctness.
@@ -1343,12 +1343,12 @@ class ScaleAndShift(Bijector):
work for, say, the left-hand argument of `batch_matmul`.
Args:
- scale: `Output`.
- event_ndims: `Output` (0D, `int32`).
+ scale: `Tensor`.
+ event_ndims: `Tensor` (0D, `int32`).
Returns:
- scale: `Output` with dims expanded according to [above] table.
- batch_ndims: `Output` (0D, `int32`). The ndims of the `batch` portion.
+ scale: `Tensor` with dims expanded according to [above] table.
+ batch_ndims: `Tensor` (0D, `int32`). The ndims of the `batch` portion.
"""
ndims = array_ops.rank(scale)
left = math_ops.select(
@@ -1747,7 +1747,7 @@ class CholeskyOuterProduct(Bijector):
"""Instantiates the `CholeskyOuterProduct` bijector.
Args:
- event_ndims: `constant` `int32` scalar `Output` indicating the number of
+ event_ndims: `constant` `int32` scalar `Tensor` indicating the number of
dimensions associated with a particular draw from the distribution. Must
be 0 or 2.
validate_args: `Boolean` indicating whether arguments should be checked
diff --git a/tensorflow/contrib/distributions/python/ops/categorical.py b/tensorflow/contrib/distributions/python/ops/categorical.py
index abcf5c1dcc..908690c1ce 100644
--- a/tensorflow/contrib/distributions/python/ops/categorical.py
+++ b/tensorflow/contrib/distributions/python/ops/categorical.py
@@ -86,12 +86,12 @@ class Categorical(distribution.Distribution):
"""Initialize Categorical distributions using class log-probabilities.
Args:
- logits: An N-D `Output`, `N >= 1`, representing the log probabilities
+ logits: An N-D `Tensor`, `N >= 1`, representing the log probabilities
of a set of Categorical distributions. The first `N - 1` dimensions
index into a batch of independent distributions and the last dimension
represents a vector of logits for each class. Only one of `logits` or
`p` should be passed in.
- p: An N-D `Output`, `N >= 1`, representing the probabilities
+ p: An N-D `Tensor`, `N >= 1`, representing the probabilities
of a set of Categorical distributions. The first `N - 1` dimensions
index into a batch of independent distributions and the last dimension
represents a vector of probabilities for each class. Only one of
diff --git a/tensorflow/contrib/distributions/python/ops/distribution.py b/tensorflow/contrib/distributions/python/ops/distribution.py
index a9dddb6356..5a3583c22a 100644
--- a/tensorflow/contrib/distributions/python/ops/distribution.py
+++ b/tensorflow/contrib/distributions/python/ops/distribution.py
@@ -208,7 +208,7 @@ class Distribution(_BaseDistribution):
`sample_n`.
`sample_n_shape = (n,) + batch_shape + event_shape`, where `sample_n_shape` is
- the shape of the `Output` returned from `sample_n`, `n` is the number of
+ the shape of the `Tensor` returned from `sample_n`, `n` is the number of
samples, `batch_shape` defines how many independent distributions there are,
and `event_shape` defines the shape of samples from each of those independent
distributions. Samples are independent along the `batch_shape` dimensions, but
@@ -229,7 +229,7 @@ class Distribution(_BaseDistribution):
# `event_shape` is `TensorShape([])`.
event_shape = u.get_event_shape()
- # `event_shape_t` is an `Output` which will evaluate to [].
+ # `event_shape_t` is a `Tensor` which will evaluate to [].
event_shape_t = u.event_shape
# Sampling returns a sample per distribution. `samples` has shape
@@ -321,7 +321,7 @@ class Distribution(_BaseDistribution):
name: A name for this distribution. Default: subclass name.
Raises:
- ValueError: if any member of graph_parents is `None` or not an `Output`.
+ ValueError: if any member of graph_parents is `None` or not a `Tensor`.
"""
graph_parents = [] if graph_parents is None else graph_parents
for i, t in enumerate(graph_parents):
@@ -344,12 +344,12 @@ class Distribution(_BaseDistribution):
Subclasses should override static method `_param_shapes`.
Args:
- sample_shape: `Output` or python list/tuple. Desired shape of a call to
+ sample_shape: `Tensor` or python list/tuple. Desired shape of a call to
`sample()`.
name: name to prepend ops with.
Returns:
- `dict` of parameter name to `Output` shapes.
+ `dict` of parameter name to `Tensor` shapes.
"""
with ops.name_scope(name, values=[sample_shape]):
return cls._param_shapes(sample_shape)
@@ -396,7 +396,7 @@ class Distribution(_BaseDistribution):
@property
def dtype(self):
- """The `DType` of `Output`s handled by this `Distribution`."""
+ """The `DType` of `Tensor`s handled by this `Distribution`."""
return self._dtype
@property
@@ -460,7 +460,7 @@ class Distribution(_BaseDistribution):
raise NotImplementedError("batch_shape is not implemented")
def batch_shape(self, name="batch_shape"):
- """Shape of a single sample from a single event index as a 1-D `Output`.
+ """Shape of a single sample from a single event index as a 1-D `Tensor`.
The product of the dimensions of the `batch_shape` is the number of
independent distributions of this kind the instance represents.
@@ -469,7 +469,7 @@ class Distribution(_BaseDistribution):
name: name to give to the op
Returns:
- batch_shape: `Output`.
+ batch_shape: `Tensor`.
"""
with self._name_scope(name):
return self._batch_shape()
@@ -491,13 +491,13 @@ class Distribution(_BaseDistribution):
raise NotImplementedError("event_shape is not implemented")
def event_shape(self, name="event_shape"):
- """Shape of a single sample from a single batch as a 1-D int32 `Output`.
+ """Shape of a single sample from a single batch as a 1-D int32 `Tensor`.
Args:
name: name to give to the op
Returns:
- event_shape: `Output`.
+ event_shape: `Tensor`.
"""
with self._name_scope(name):
return self._event_shape()
@@ -526,13 +526,13 @@ class Distribution(_BaseDistribution):
sample.
Args:
- sample_shape: 0D or 1D `int32` `Output`. Shape of the generated samples.
+ sample_shape: 0D or 1D `int32` `Tensor`. Shape of the generated samples.
seed: Python integer seed for RNG
name: name to give to the op.
**condition_kwargs: Named arguments forwarded to subclass implementation.
Returns:
- samples: an `Output` with prepended dimensions `sample_shape`.
+ samples: a `Tensor` with prepended dimensions `sample_shape`.
"""
with self._name_scope(name, values=[sample_shape]):
sample_shape = ops.convert_to_tensor(
@@ -552,14 +552,14 @@ class Distribution(_BaseDistribution):
"""Generate `n` samples.
Args:
- n: `Scalar` `Output` of type `int32` or `int64`, the number of
+ n: `Scalar` `Tensor` of type `int32` or `int64`, the number of
observations to sample.
seed: Python integer seed for RNG
name: name to give to the op.
**condition_kwargs: Named arguments forwarded to subclass implementation.
Returns:
- samples: an `Output` with a prepended dimension (n,).
+ samples: a `Tensor` with a prepended dimension (n,).
Raises:
TypeError: if `n` is not an integer type.
@@ -599,12 +599,12 @@ class Distribution(_BaseDistribution):
"""Log probability density/mass function (depending on `is_continuous`).
Args:
- value: `float` or `double` `Output`.
+ value: `float` or `double` `Tensor`.
name: The name to give this op.
**condition_kwargs: Named arguments forwarded to subclass implementation.
Returns:
- log_prob: an `Output` of shape `sample_shape(x) + self.batch_shape` with
+ log_prob: a `Tensor` of shape `sample_shape(x) + self.batch_shape` with
values of type `self.dtype`.
"""
with self._name_scope(name, values=[value]):
@@ -621,12 +621,12 @@ class Distribution(_BaseDistribution):
"""Probability density/mass function (depending on `is_continuous`).
Args:
- value: `float` or `double` `Output`.
+ value: `float` or `double` `Tensor`.
name: The name to give this op.
**condition_kwargs: Named arguments forwarded to subclass implementation.
Returns:
- prob: an `Output` of shape `sample_shape(x) + self.batch_shape` with
+ prob: a `Tensor` of shape `sample_shape(x) + self.batch_shape` with
values of type `self.dtype`.
"""
with self._name_scope(name, values=[value]):
@@ -656,12 +656,12 @@ class Distribution(_BaseDistribution):
`x << -1`.
Args:
- value: `float` or `double` `Output`.
+ value: `float` or `double` `Tensor`.
name: The name to give this op.
**condition_kwargs: Named arguments forwarded to subclass implementation.
Returns:
- logcdf: an `Output` of shape `sample_shape(x) + self.batch_shape` with
+ logcdf: a `Tensor` of shape `sample_shape(x) + self.batch_shape` with
values of type `self.dtype`.
"""
with self._name_scope(name, values=[value]):
@@ -687,12 +687,12 @@ class Distribution(_BaseDistribution):
```
Args:
- value: `float` or `double` `Output`.
+ value: `float` or `double` `Tensor`.
name: The name to give this op.
**condition_kwargs: Named arguments forwarded to subclass implementation.
Returns:
- cdf: an `Output` of shape `sample_shape(x) + self.batch_shape` with
+ cdf: a `Tensor` of shape `sample_shape(x) + self.batch_shape` with
values of type `self.dtype`.
"""
with self._name_scope(name, values=[value]):
@@ -724,12 +724,12 @@ class Distribution(_BaseDistribution):
survival function, which are more accurate than `1 - cdf(x)` when `x >> 1`.
Args:
- value: `float` or `double` `Output`.
+ value: `float` or `double` `Tensor`.
name: The name to give this op.
**condition_kwargs: Named arguments forwarded to subclass implementation.
Returns:
- `Output` of shape `sample_shape(x) + self.batch_shape` with values of type
+ `Tensor` of shape `sample_shape(x) + self.batch_shape` with values of type
`self.dtype`.
"""
with self._name_scope(name, values=[value]):
@@ -758,7 +758,7 @@ class Distribution(_BaseDistribution):
```
Args:
- value: `float` or `double` `Output`.
+ value: `float` or `double` `Tensor`.
name: The name to give this op.
**condition_kwargs: Named arguments forwarded to subclass implementation.
@@ -820,12 +820,12 @@ class Distribution(_BaseDistribution):
"""Log probability density function.
Args:
- value: `float` or `double` `Output`.
+ value: `float` or `double` `Tensor`.
name: The name to give this op.
**condition_kwargs: Named arguments forwarded to subclass implementation.
Returns:
- log_prob: an `Output` of shape `sample_shape(x) + self.batch_shape` with
+ log_prob: a `Tensor` of shape `sample_shape(x) + self.batch_shape` with
values of type `self.dtype`.
Raises:
@@ -842,12 +842,12 @@ class Distribution(_BaseDistribution):
"""Probability density function.
Args:
- value: `float` or `double` `Output`.
+ value: `float` or `double` `Tensor`.
name: The name to give this op.
**condition_kwargs: Named arguments forwarded to subclass implementation.
Returns:
- prob: an `Output` of shape `sample_shape(x) + self.batch_shape` with
+ prob: a `Tensor` of shape `sample_shape(x) + self.batch_shape` with
values of type `self.dtype`.
Raises:
@@ -864,12 +864,12 @@ class Distribution(_BaseDistribution):
"""Log probability mass function.
Args:
- value: `float` or `double` `Output`.
+ value: `float` or `double` `Tensor`.
name: The name to give this op.
**condition_kwargs: Named arguments forwarded to subclass implementation.
Returns:
- log_pmf: an `Output` of shape `sample_shape(x) + self.batch_shape` with
+ log_pmf: a `Tensor` of shape `sample_shape(x) + self.batch_shape` with
values of type `self.dtype`.
Raises:
@@ -886,12 +886,12 @@ class Distribution(_BaseDistribution):
"""Probability mass function.
Args:
- value: `float` or `double` `Output`.
+ value: `float` or `double` `Tensor`.
name: The name to give this op.
**condition_kwargs: Named arguments forwarded to subclass implementation.
Returns:
- pmf: an `Output` of shape `sample_shape(x) + self.batch_shape` with
+ pmf: a `Tensor` of shape `sample_shape(x) + self.batch_shape` with
values of type `self.dtype`.
Raises:
diff --git a/tensorflow/contrib/distributions/python/ops/distribution_util.py b/tensorflow/contrib/distributions/python/ops/distribution_util.py
index a036843955..fb46c3c52e 100644
--- a/tensorflow/contrib/distributions/python/ops/distribution_util.py
+++ b/tensorflow/contrib/distributions/python/ops/distribution_util.py
@@ -41,8 +41,8 @@ def assert_close(
"""Assert that that x and y are within machine epsilon of each other.
Args:
- x: Numeric `Output`
- y: Numeric `Output`
+ x: Numeric `Tensor`
+ y: Numeric `Tensor`
data: The tensors to print out if the condition is `False`. Defaults to
error message and first few entries of `x` and `y`.
summarize: Print this many entries of each tensor.
@@ -79,7 +79,7 @@ def assert_integer_form(
"""Assert that x has integer components (or floats equal to integers).
Args:
- x: Numeric `Output`
+ x: Numeric `Tensor`
data: The tensors to print out if the condition is `False`. Defaults to
error message and first few entries of `x` and `y`.
summarize: Print this many entries of each tensor.
@@ -110,8 +110,8 @@ def get_logits_and_prob(
"""Converts logits to probabilities and vice-versa, and returns both.
Args:
- logits: Numeric `Output` representing log-odds.
- p: Numeric `Output` representing probabilities.
+ logits: Numeric `Tensor` representing log-odds.
+ p: Numeric `Tensor` representing probabilities.
multidimensional: `Boolean`, default `False`.
If `True`, represents whether the last dimension of `logits` or `p`,
a [N1, N2, ... k] dimensional tensor, represent the
@@ -185,14 +185,14 @@ def log_combinations(n, counts, name="log_combinations"):
where `i` runs over all `k` classes.
Args:
- n: Numeric `Output` broadcastable with `counts`. This represents `n`
+ n: Numeric `Tensor` broadcastable with `counts`. This represents `n`
outcomes.
- counts: Numeric `Output` broadcastable with `n`. This represents counts
+ counts: Numeric `Tensor` broadcastable with `n`. This represents counts
in `k` classes, where `k` is the last dimension of the tensor.
name: A name for this operation (optional).
Returns:
- `Output` representing the multinomial coefficient between `n` and `counts`.
+ `Tensor` representing the multinomial coefficient between `n` and `counts`.
"""
# First a bit about the number of ways counts could have come in:
# E.g. if counts = [1, 2], then this is 3 choose 2.
@@ -247,16 +247,16 @@ def matrix_diag_transform(matrix, transform=None, name=None):
```
Args:
- matrix: Rank `R` `Output`, `R >= 2`, where the last two dimensions are
+ matrix: Rank `R` `Tensor`, `R >= 2`, where the last two dimensions are
equal.
- transform: Element-wise function mapping `Output`s to `Output`s. To
+ transform: Element-wise function mapping `Tensors` to `Tensors`. To
be applied to the diagonal of `matrix`. If `None`, `matrix` is returned
unchanged. Defaults to `None`.
name: A name to give created ops.
Defaults to "matrix_diag_transform".
Returns:
- An `Output` with same shape and `dtype` as `matrix`.
+ A `Tensor` with same shape and `dtype` as `matrix`.
"""
with ops.name_scope(name, "matrix_diag_transform", [matrix]):
matrix = ops.convert_to_tensor(matrix, name="matrix")
@@ -295,13 +295,13 @@ def rotate_transpose(x, shift, name="rotate_transpose"):
```
Args:
- x: `Output`.
- shift: `Output`. Number of dimensions to transpose left (shift<0) or
+ x: `Tensor`.
+ shift: `Tensor`. Number of dimensions to transpose left (shift<0) or
transpose right (shift>0).
name: `String`. The name to give this op.
Returns:
- rotated_x: Input `Output` with dimensions circularly rotated by shift.
+ rotated_x: Input `Tensor` with dimensions circularly rotated by shift.
Raises:
TypeError: if shift is not integer type.
@@ -348,18 +348,18 @@ def pick_vector(cond,
true_vector,
false_vector,
name="pick_vector"):
- """Picks possibly different length row `Output`s based on condition.
+ """Picks possibly different length row `Tensor`s based on condition.
- Value `Output`s should have exactly one dimension.
+ Value `Tensor`s should have exactly one dimension.
If `cond` is a python Boolean or `tf.constant` then either `true_vector` or
`false_vector` is immediately returned. I.e., no graph nodes are created and
no validation happens.
Args:
- cond: `Output`. Must have `dtype=tf.bool` and be scalar.
- true_vector: `Output` of one dimension. Returned when cond is `True`.
- false_vector: `Output` of one dimension. Returned when cond is `False`.
+ cond: `Tensor`. Must have `dtype=tf.bool` and be scalar.
+ true_vector: `Tensor` of one dimension. Returned when cond is `True`.
+ false_vector: `Tensor` of one dimension. Returned when cond is `False`.
name: `String`. The name to give this op.
Example:
@@ -372,7 +372,7 @@ def pick_vector(cond,
```
Returns:
- true_or_false_vector: `Output`.
+ true_or_false_vector: `Tensor`.
Raises:
TypeError: if `cond.dtype != tf.bool`
@@ -439,14 +439,14 @@ def fill_lower_triangular(x, validate_args=False, name="fill_lower_triangular"):
`distribution_util_test.py`, function `_fill_lower_triangular`.
Args:
- x: `Output` representing lower triangular elements.
+ x: `Tensor` representing lower triangular elements.
validate_args: `Boolean`, default `False`. Whether to ensure the shape of
`x` can be mapped to a lower triangular matrix (controls non-static checks
only).
name: `String`. The name to give this op.
Returns:
- tril: `Output` with lower triangular elements filled from `x`.
+ tril: `Tensor` with lower triangular elements filled from `x`.
Raises:
ValueError: if shape if `x` has static shape which cannot be mapped to a
diff --git a/tensorflow/contrib/distributions/python/ops/mvn.py b/tensorflow/contrib/distributions/python/ops/mvn.py
index 3508fd02bb..e9d5647385 100644
--- a/tensorflow/contrib/distributions/python/ops/mvn.py
+++ b/tensorflow/contrib/distributions/python/ops/mvn.py
@@ -47,7 +47,7 @@ __all__ = [
]
_mvn_prob_note = """
-`x` is a batch vector with compatible shape if `x` is an `Output` whose
+`x` is a batch vector with compatible shape if `x` is a `Tensor` whose
shape can be broadcast up to either:
```
@@ -372,7 +372,7 @@ class MultivariateNormalDiag(_MultivariateNormalOperatorPD):
Args:
mu: Rank `N + 1` floating point tensor with shape `[N1,...,Nb, k]`,
`b >= 0`.
- diag_stdev: Rank `N + 1` `Output` with same `dtype` and shape as `mu`,
+ diag_stdev: Rank `N + 1` `Tensor` with same `dtype` and shape as `mu`,
representing the standard deviations. Must be positive.
validate_args: `Boolean`, default `False`. Whether to validate
input with asserts. If `validate_args` is `False`,
@@ -612,7 +612,7 @@ class MultivariateNormalCholesky(_MultivariateNormalOperatorPD):
Args:
mu: `(N+1)-D` floating point tensor with shape `[N1,...,Nb, k]`,
`b >= 0`.
- chol: `(N+2)-D` `Output` with same `dtype` as `mu` and shape
+ chol: `(N+2)-D` `Tensor` with same `dtype` as `mu` and shape
`[N1,...,Nb, k, k]`. The upper triangular part is ignored (treated as
though it is zero), and the diagonal must be positive.
validate_args: `Boolean`, default `False`. Whether to validate input
@@ -696,7 +696,7 @@ class MultivariateNormalFull(_MultivariateNormalOperatorPD):
Args:
mu: `(N+1)-D` floating point tensor with shape `[N1,...,Nb, k]`,
`b >= 0`.
- sigma: `(N+2)-D` `Output` with same `dtype` as `mu` and shape
+ sigma: `(N+2)-D` `Tensor` with same `dtype` as `mu` and shape
`[N1,...,Nb, k, k]`. Each batch member must be positive definite.
validate_args: `Boolean`, default `False`. Whether to validate input
with asserts. If `validate_args` is `False`, and the inputs are
diff --git a/tensorflow/contrib/distributions/python/ops/operator_pd.py b/tensorflow/contrib/distributions/python/ops/operator_pd.py
index c679104c08..283adf8b79 100644
--- a/tensorflow/contrib/distributions/python/ops/operator_pd.py
+++ b/tensorflow/contrib/distributions/python/ops/operator_pd.py
@@ -122,11 +122,11 @@ class OperatorPDBase(object):
"""Add matrix represented by this operator to `mat`. Equiv to `A + mat`.
Args:
- mat: `Output` with same `dtype` and shape broadcastable to `self`.
+ mat: `Tensor` with same `dtype` and shape broadcastable to `self`.
name: A name to give this `Op`.
Returns:
- An `Output` with broadcast shape and same `dtype` as `self`.
+ A `Tensor` with broadcast shape and same `dtype` as `self`.
"""
with ops.name_scope(self.name):
with ops.name_scope(name, values=self.inputs + [mat]):
@@ -165,11 +165,11 @@ class OperatorPDBase(object):
```
Args:
- x: `Output` with compatible batch vector shape and same `dtype` as self.
+ x: `Tensor` with compatible batch vector shape and same `dtype` as self.
name: A name scope to use for ops added by this method.
Returns:
- `Output` with shape `[M1,...,Mm] + [N1,...,Nn]` and same `dtype`
+ `Tensor` with shape `[M1,...,Mm] + [N1,...,Nn]` and same `dtype`
as `self`.
"""
with ops.name_scope(self.name):
@@ -340,7 +340,7 @@ class OperatorPDBase(object):
name: A name scope to use for ops added by this method.
Returns:
- `int32` `Output`
+ `int32` `Tensor`
"""
with ops.name_scope(self.name):
with ops.name_scope(name, values=self.inputs):
@@ -361,7 +361,7 @@ class OperatorPDBase(object):
name: A name scope to use for ops added by this method.
Returns:
- `int32` `Output`
+ `int32` `Tensor`
"""
# Derived classes get this "for free" once .shape() is implemented.
with ops.name_scope(self.name):
@@ -378,7 +378,7 @@ class OperatorPDBase(object):
name: A name scope to use for ops added by this method.
Returns:
- `int32` `Output`
+ `int32` `Tensor`
"""
# Derived classes get this "for free" once .shape() is implemented.
with ops.name_scope(self.name):
@@ -395,7 +395,7 @@ class OperatorPDBase(object):
name: A name scope to use for ops added by this method.
Returns:
- `int32` `Output`
+ `int32` `Tensor`
"""
# Derived classes get this "for free" once .shape() is implemented.
with ops.name_scope(self.name):
@@ -413,7 +413,7 @@ class OperatorPDBase(object):
name: A name scope to use for ops added by this method.
Returns:
- `int32` `Output`
+ `int32` `Tensor`
"""
# Derived classes get this "for free" once .shape() is implemented.
with ops.name_scope(self.name):
@@ -431,7 +431,7 @@ class OperatorPDBase(object):
```
Args:
- x: `Output` with shape `self.batch_shape + [k, r]` and same `dtype` as
+ x: `Tensor` with shape `self.batch_shape + [k, r]` and same `dtype` as
this `Operator`.
transpose_x: If `True`, `x` is transposed before multiplication.
name: A name to give this `Op`.
@@ -465,7 +465,7 @@ class OperatorPDBase(object):
```
Args:
- x: `Output` with shape `self.batch_shape + [k, r]` and same `dtype` as
+ x: `Tensor` with shape `self.batch_shape + [k, r]` and same `dtype` as
this `Operator`.
transpose_x: If `True`, `x` is transposed before multiplication.
name: A name scope to use for ops added by this method.
@@ -519,12 +519,12 @@ class OperatorPDBase(object):
```
Args:
- rhs: `Output` with same `dtype` as this operator and compatible shape,
+ rhs: `Tensor` with same `dtype` as this operator and compatible shape,
`rhs.shape = self.shape[:-1] + [r]` for `r >= 1`.
name: A name scope to use for ops added by this method.
Returns:
- `Output` with same `dtype` and shape as `x`.
+ `Tensor` with same `dtype` and shape as `x`.
"""
with ops.name_scope(self.name):
with ops.name_scope(name, values=[rhs] + self.inputs):
@@ -571,12 +571,12 @@ class OperatorPDBase(object):
```
Args:
- rhs: `Output` with same `dtype` as this operator and compatible shape,
+ rhs: `Tensor` with same `dtype` as this operator and compatible shape,
`rhs.shape = self.shape[:-1] + [r]` for `r >= 1`.
name: A name scope to use for ops added by this method.
Returns:
- `Output` with same `dtype` and shape as `x`.
+ `Tensor` with same `dtype` and shape as `x`.
"""
with ops.name_scope(self.name):
with ops.name_scope(name, values=[rhs] + self.inputs):
@@ -642,12 +642,12 @@ def flip_matrix_to_vector(mat, batch_shape, static_batch_shape):
See also: flip_vector_to_matrix.
Args:
- mat: `Output` with rank `>= 2`.
- batch_shape: `int32` `Output` giving leading "batch" shape of result.
+ mat: `Tensor` with rank `>= 2`.
+ batch_shape: `int32` `Tensor` giving leading "batch" shape of result.
static_batch_shape: `TensorShape` object giving batch shape of result.
Returns:
- `Output` with same elements as `mat` but with shape `batch_shape + [k]`.
+ `Tensor` with same elements as `mat` but with shape `batch_shape + [k]`.
"""
mat = ops.convert_to_tensor(mat, name="mat")
if (static_batch_shape.is_fully_defined()
@@ -717,12 +717,12 @@ def flip_vector_to_matrix(vec, batch_shape, static_batch_shape):
See also: flip_matrix_to_vector.
Args:
- vec: `Output` with shape `[M1,...,Mm] + [N1,...,Nn] + [k]`
- batch_shape: `int32` `Output`.
+ vec: `Tensor` with shape `[M1,...,Mm] + [N1,...,Nn] + [k]`
+ batch_shape: `int32` `Tensor`.
static_batch_shape: `TensorShape` with statically determined batch shape.
Returns:
- `Output` with same `dtype` as `vec` and new shape.
+ `Tensor` with same `dtype` as `vec` and new shape.
"""
vec = ops.convert_to_tensor(vec, name="vec")
if (
@@ -805,17 +805,17 @@ def extract_batch_shape(x, num_event_dims, name="extract_batch_shape"):
"""Extract the batch shape from `x`.
Assuming `x.shape = batch_shape + event_shape`, when `event_shape` has
- `num_event_dims` dimensions. This `Op` returns the batch shape `Output`.
+ `num_event_dims` dimensions. This `Op` returns the batch shape `Tensor`.
Args:
- x: `Output` with rank at least `num_event_dims`. If rank is not high enough
+ x: `Tensor` with rank at least `num_event_dims`. If rank is not high enough
this `Op` will fail.
- num_event_dims: `int32` scalar `Output`. The number of trailing dimensions
+ num_event_dims: `int32` scalar `Tensor`. The number of trailing dimensions
in `x` to be considered as part of `event_shape`.
name: A name to prepend to created `Ops`.
Returns:
- batch_shape: `1-D` `int32` `Output`
+ batch_shape: `1-D` `int32` `Tensor`
"""
with ops.name_scope(name, values=[x]):
x = ops.convert_to_tensor(x, name="x")
diff --git a/tensorflow/contrib/distributions/python/ops/operator_pd_identity.py b/tensorflow/contrib/distributions/python/ops/operator_pd_identity.py
index ee224d7125..a95c34de0d 100644
--- a/tensorflow/contrib/distributions/python/ops/operator_pd_identity.py
+++ b/tensorflow/contrib/distributions/python/ops/operator_pd_identity.py
@@ -48,7 +48,7 @@ class OperatorPDIdentity(operator_pd.OperatorPDBase):
"""Initialize an `OperatorPDIdentity`.
Args:
- shape: `int32` rank 1 `Output` of length at least 2, and with the last
+ shape: `int32` rank 1 `Tensor` of length at least 2, and with the last
two entries equal (since this is a square matrix).
dtype: Data type of the matrix that this operator represents.
verify_pd: `Boolean`, if `True`, asserts are added to the initialization
diff --git a/tensorflow/contrib/distributions/python/ops/operator_pd_vdvt_update.py b/tensorflow/contrib/distributions/python/ops/operator_pd_vdvt_update.py
index eff3133c44..819a6da47c 100644
--- a/tensorflow/contrib/distributions/python/ops/operator_pd_vdvt_update.py
+++ b/tensorflow/contrib/distributions/python/ops/operator_pd_vdvt_update.py
@@ -88,9 +88,9 @@ class OperatorPDSqrtVDVTUpdate(operator_pd.OperatorPDBase):
Args:
operator: Subclass of `OperatorPDBase`. Represents the (batch) positive
definite matrix `M` in `R^{k x k}`.
- v: `Output` defining batch matrix of same `dtype` and `batch_shape` as
+ v: `Tensor` defining batch matrix of same `dtype` and `batch_shape` as
`operator`, and last two dimensions of shape `(k, r)`.
- diag: Optional `Output` defining batch vector of same `dtype` and
+ diag: Optional `Tensor` defining batch vector of same `dtype` and
`batch_shape` as `operator`, and last dimension of size `r`. If `None`,
the update becomes `VV^T` rather than `VDV^T`.
verify_pd: `Boolean`. If `True`, add asserts that `diag > 0`, which,
diff --git a/tensorflow/contrib/distributions/python/ops/quantized_distribution.py b/tensorflow/contrib/distributions/python/ops/quantized_distribution.py
index ec034b0718..bca3f99604 100644
--- a/tensorflow/contrib/distributions/python/ops/quantized_distribution.py
+++ b/tensorflow/contrib/distributions/python/ops/quantized_distribution.py
@@ -38,11 +38,11 @@ def _logsum_expbig_minus_expsmall(big, small):
To work correctly, we should have the pointwise relation: `small <= big`.
Args:
- big: Numeric `Output`
- small: Numeric `Output` with same `dtype` as `big` and broadcastable shape.
+ big: Numeric `Tensor`
+ small: Numeric `Tensor` with same `dtype` as `big` and broadcastable shape.
Returns:
- `Output` of same `dtype` of `big` and broadcast shape.
+ `Tensor` of same `dtype` of `big` and broadcast shape.
"""
with ops.name_scope("logsum_expbig_minus_expsmall", values=[small, big]):
return math_ops.log(1. - math_ops.exp(small - big)) + big
@@ -193,11 +193,11 @@ class QuantizedDistribution(distributions.Distribution):
Args:
distribution: The base distribution class to transform. Typically an
instance of `Distribution`.
- lower_cutoff: `Output` with same `dtype` as this distribution and shape
+ lower_cutoff: `Tensor` with same `dtype` as this distribution and shape
able to be added to samples. Should be a whole number. Default `None`.
If provided, base distribution's pdf/pmf should be defined at
`lower_cutoff`.
- upper_cutoff: `Output` with same `dtype` as this distribution and shape
+ upper_cutoff: `Tensor` with same `dtype` as this distribution and shape
able to be added to samples. Should be a whole number. Default `None`.
If provided, base distribution's pdf/pmf should be defined at
`upper_cutoff - 1`.
diff --git a/tensorflow/contrib/distributions/python/ops/shape.py b/tensorflow/contrib/distributions/python/ops/shape.py
index d8f419837e..f5b2d94a8a 100644
--- a/tensorflow/contrib/distributions/python/ops/shape.py
+++ b/tensorflow/contrib/distributions/python/ops/shape.py
@@ -33,12 +33,12 @@ class _DistributionShape(object):
"""Manage and manipulate `Distribution` shape.
Terminology:
- Recall that an `Output` has:
- - `shape`: size of `Output` dimensions,
- - `ndims`: size of `shape`; number of `Output` dimensions,
+ Recall that a `Tensor` has:
+ - `shape`: size of `Tensor` dimensions,
+ - `ndims`: size of `shape`; number of `Tensor` dimensions,
- `dims`: indexes into `shape`; useful for transpose, reduce.
- `Output`s sampled from a `Distribution` can be partitioned by `sample_dims`,
+ `Tensor`s sampled from a `Distribution` can be partitioned by `sample_dims`,
`batch_dims`, and `event_dims`. To understand the semantics of these
dimensions, consider when two of the three are fixed and the remaining
is varied:
@@ -49,12 +49,12 @@ class _DistributionShape(object):
- `event_dims`: indexes event coordinates from one sample.
The `sample`, `batch`, and `event` dimensions constitute the entirety of a
- `Distribution` `Output`'s shape.
+ `Distribution` `Tensor`'s shape.
The dimensions are always in `sample`, `batch`, `event` order.
Purpose:
- This class partitions `Output` notions of `shape`, `ndims`, and `dims` into
+ This class partitions `Tensor` notions of `shape`, `ndims`, and `dims` into
`Distribution` notions of `sample,` `batch,` and `event` dimensions. That
is, it computes any of:
@@ -64,10 +64,10 @@ class _DistributionShape(object):
sample_ndims batch_ndims event_ndims
```
- for a given `Output`, e.g., the result of
+ for a given `Tensor`, e.g., the result of
`Distribution.sample(sample_shape=...)`.
- For a given `Output`, this class computes the above table using minimal
+ For a given `Tensor`, this class computes the above table using minimal
information: `batch_ndims` and `event_ndims`.
Examples of `Distribution` `shape` semantics:
@@ -96,7 +96,7 @@ class _DistributionShape(object):
reduction_indices=batch_dims)
```
- The `Laplace` distribution generates an `Output` of shape `[1000]`. When
+ The `Laplace` distribution generates a `Tensor` of shape `[1000]`. When
fed to a `Normal`, this is interpreted as 1000 different locations, i.e.,
1000 non-identical Normals. Therefore a single call to `pdf(x)` yields
1000 probabilities, one for every location. The average over this batch
@@ -153,8 +153,8 @@ class _DistributionShape(object):
performance degradation because data must be switched from GPU to CPU.
For example, when `validate_args=False` and `event_ndims` is a
- non-constant `Output`, it is checked to be a non-negative integer at graph
- execution. (Same for `batch_ndims`). Constant `Output`s and non-`Output`
+ non-constant `Tensor`, it is checked to be a non-negative integer at graph
+ execution. (Same for `batch_ndims`). Constant `Tensor`s and non-`Tensor`
arguments are always checked for correctness since this can be done for
"free," i.e., during graph construction.
"""
@@ -170,19 +170,19 @@ class _DistributionShape(object):
`Distribution`. They may only be known at graph execution.
If both `batch_ndims` and `event_ndims` are python scalars (rather than
- either being an `Output`), functions in this class automatically perform
+ either being a `Tensor`), functions in this class automatically perform
sanity checks during graph construction.
Args:
- batch_ndims: `Output`. Number of `dims` (`rank`) of the batch portion of
- indexes of an `Output`. A "batch" is a non-identical distribution, i.e,
+ batch_ndims: `Tensor`. Number of `dims` (`rank`) of the batch portion of
+ indexes of a `Tensor`. A "batch" is a non-identical distribution, i.e,
Normal with different parameters.
- event_ndims: `Output`. Number of `dims` (`rank`) of the event portion of
- indexes of an `Output`. An "event" is what is sampled from a
+ event_ndims: `Tensor`. Number of `dims` (`rank`) of the event portion of
+ indexes of a `Tensor`. An "event" is what is sampled from a
distribution, i.e., a trivariate Normal has an event shape of [3] and a
4 dimensional Wishart has an event shape of [4, 4].
validate_args: `Boolean`, default `False`. When `True`, non-`tf.constant`
- `Output` arguments are checked for correctness. (`tf.constant`
+ `Tensor` arguments are checked for correctness. (`tf.constant`
arguments are always checked.)
name: `String`. The name prepended to Ops created by this class.
@@ -226,18 +226,18 @@ class _DistributionShape(object):
@property
def validate_args(self):
- """Returns True if graph-runtime `Output` checks are enabled."""
+ """Returns True if graph-runtime `Tensor` checks are enabled."""
return self._validate_args
def get_ndims(self, x, name="get_ndims"):
- """Get `Output` number of dimensions (rank).
+ """Get `Tensor` number of dimensions (rank).
Args:
- x: `Output`.
+ x: `Tensor`.
name: `String`. The name to give this op.
Returns:
- ndims: Scalar number of dimensions associated with an `Output`.
+ ndims: Scalar number of dimensions associated with a `Tensor`.
"""
with self._name_scope(name, values=[x]):
x = ops.convert_to_tensor(x, name="x")
@@ -250,11 +250,11 @@ class _DistributionShape(object):
"""Returns number of dimensions corresponding to iid draws ("sample").
Args:
- x: `Output`.
+ x: `Tensor`.
name: `String`. The name to give this op.
Returns:
- sample_ndims: `Output` (0D, `int32`).
+ sample_ndims: `Tensor` (0D, `int32`).
Raises:
ValueError: if `sample_ndims` is calculated to be negative.
@@ -295,13 +295,13 @@ class _DistributionShape(object):
```
Args:
- x: `Output`.
+ x: `Tensor`.
name: `String`. The name to give this op.
Returns:
- sample_dims: `Output` (1D, `int32`).
- batch_dims: `Output` (1D, `int32`).
- event_dims: `Output` (1D, `int32`).
+ sample_dims: `Tensor` (1D, `int32`).
+ batch_dims: `Tensor` (1D, `int32`).
+ event_dims: `Tensor` (1D, `int32`).
"""
with self._name_scope(name, values=[x]):
def make_dims(start_sum, size, name):
@@ -323,16 +323,16 @@ class _DistributionShape(object):
self.event_ndims, name="event_dims"))
def get_shape(self, x, name="get_shape"):
- """Returns `Output`'s shape partitioned into `sample`, `batch`, `event`.
+ """Returns `Tensor`'s shape partitioned into `sample`, `batch`, `event`.
Args:
- x: `Output`.
+ x: `Tensor`.
name: `String`. The name to give this op.
Returns:
- sample_shape: `Output` (1D, `int32`).
- batch_shape: `Output` (1D, `int32`).
- event_shape: `Output` (1D, `int32`).
+ sample_shape: `Tensor` (1D, `int32`).
+ batch_shape: `Tensor` (1D, `int32`).
+ event_shape: `Tensor` (1D, `int32`).
"""
with self._name_scope(name, values=[x]):
x = ops.convert_to_tensor(x, name="x")
@@ -359,7 +359,7 @@ class _DistributionShape(object):
def make_batch_of_event_sample_matrices(
self, x, name="make_batch_of_event_sample_matrices"):
- """Reshapes/transposes `Distribution` `Output` from S+B+E to B_+E_+S_.
+ """Reshapes/transposes `Distribution` `Tensor` from S+B+E to B_+E_+S_.
Where:
- `B_ = B if B else [1]`,
@@ -367,12 +367,12 @@ class _DistributionShape(object):
- `S_ = [tf.reduce_prod(S)]`.
Args:
- x: `Output`.
+ x: `Tensor`.
name: `String`. The name to give this op.
Returns:
- x: `Output`. Input transposed/reshaped to `B_+E_+S_`.
- sample_shape: `Output` (1D, `int32`).
+ x: `Tensor`. Input transposed/reshaped to `B_+E_+S_`.
+ sample_shape: `Tensor` (1D, `int32`).
"""
with self._name_scope(name, values=[x]):
x = ops.convert_to_tensor(x, name="x")
@@ -388,7 +388,7 @@ class _DistributionShape(object):
def undo_make_batch_of_event_sample_matrices(
self, x, sample_shape, name="undo_make_batch_of_event_sample_matrices"):
- """Reshapes/transposes `Distribution` `Output` from B_+E_+S_ to S+B+E.
+ """Reshapes/transposes `Distribution` `Tensor` from B_+E_+S_ to S+B+E.
Where:
- `B_ = B if B else [1]`,
@@ -398,12 +398,12 @@ class _DistributionShape(object):
This function "reverses" `make_batch_of_event_sample_matrices`.
Args:
- x: `Output` of shape `B_+E_+S_`.
- sample_shape: `Output` (1D, `int32`).
+ x: `Tensor` of shape `B_+E_+S_`.
+ sample_shape: `Tensor` (1D, `int32`).
name: `String`. The name to give this op.
Returns:
- x: `Output`. Input transposed/reshaped to `S+B+E`.
+ x: `Tensor`. Input transposed/reshaped to `S+B+E`.
"""
with self._name_scope(name, values=[x, sample_shape]):
x = ops.convert_to_tensor(x, name="x")
diff --git a/tensorflow/contrib/distributions/python/ops/wishart.py b/tensorflow/contrib/distributions/python/ops/wishart.py
index 288d958ca2..ae106628cc 100644
--- a/tensorflow/contrib/distributions/python/ops/wishart.py
+++ b/tensorflow/contrib/distributions/python/ops/wishart.py
@@ -170,7 +170,7 @@ class _WishartOperatorPD(distribution.Distribution):
@property
def cholesky_input_output_matrices(self):
- """Boolean indicating if `Output` input/outputs are Cholesky factorized."""
+ """Boolean indicating if `Tensor` input/outputs are Cholesky factorized."""
return self._cholesky_input_output_matrices
@property
@@ -488,9 +488,9 @@ class WishartCholesky(_WishartOperatorPD):
"""Construct Wishart distributions.
Args:
- df: `float` or `double` `Output`. Degrees of freedom, must be greater than
+ df: `float` or `double` `Tensor`. Degrees of freedom, must be greater than
or equal to dimension of the scale matrix.
- scale: `float` or `double` `Output`. The Cholesky factorization of
+ scale: `float` or `double` `Tensor`. The Cholesky factorization of
the symmetric positive definite scale matrix of the distribution.
cholesky_input_output_matrices: `Boolean`. Any function which whose input
or output is a matrix assumes the input is Cholesky and returns a
@@ -589,9 +589,9 @@ class WishartFull(_WishartOperatorPD):
"""Construct Wishart distributions.
Args:
- df: `float` or `double` `Output`. Degrees of freedom, must be greater than
+ df: `float` or `double` `Tensor`. Degrees of freedom, must be greater than
or equal to dimension of the scale matrix.
- scale: `float` or `double` `Output`. The symmetric positive definite
+ scale: `float` or `double` `Tensor`. The symmetric positive definite
scale matrix of the distribution.
cholesky_input_output_matrices: `Boolean`. Any function which whose input
or output is a matrix assumes the input is Cholesky and returns a
diff --git a/tensorflow/contrib/framework/python/framework/checkpoint_utils.py b/tensorflow/contrib/framework/python/framework/checkpoint_utils.py
index 9c14d24857..c8d644382b 100644
--- a/tensorflow/contrib/framework/python/framework/checkpoint_utils.py
+++ b/tensorflow/contrib/framework/python/framework/checkpoint_utils.py
@@ -71,7 +71,7 @@ def load_variable(checkpoint_dir, name):
name: Name of the tensor to return.
Returns:
- `Output` object.
+ `Tensor` object.
"""
# TODO(b/29227106): Fix this in the right place and remove this.
if name.endswith(":0"):
@@ -111,7 +111,7 @@ def _set_checkpoint_initializer(variable, file_pattern, tensor_name, slice_spec,
Args:
variable: `Variable` object.
file_pattern: string, where to load checkpoints from.
- tensor_name: Name of the `Output` to load from checkpoint reader.
+ tensor_name: Name of the `Tensor` to load from checkpoint reader.
slice_spec: Slice specification for loading partitioned variables.
name: Name of the operation.
"""
diff --git a/tensorflow/contrib/framework/python/framework/tensor_util.py b/tensorflow/contrib/framework/python/framework/tensor_util.py
index f5abf106fd..7176196627 100644
--- a/tensorflow/contrib/framework/python/framework/tensor_util.py
+++ b/tensorflow/contrib/framework/python/framework/tensor_util.py
@@ -43,7 +43,7 @@ def _assert_same_base_type(items, expected_type=None):
r"""Asserts all items are of the same base type.
Args:
- items: List of graph items (e.g., `Variable`, `Output`, `SparseTensor`,
+ items: List of graph items (e.g., `Variable`, `Tensor`, `SparseTensor`,
`Operation`, or `IndexedSlices`). Can include `None` elements, which
will be ignored.
expected_type: Expected type. If not specified, assert all items are
@@ -155,8 +155,8 @@ def remove_squeezable_dimensions(predictions, labels):
operations, which could result in a performance hit.
Args:
- predictions: Predicted values, an `Output` of arbitrary dimensions.
- labels: Label values, an `Output` whose dimensions match `predictions`.
+ predictions: Predicted values, a `Tensor` of arbitrary dimensions.
+ labels: Label values, a `Tensor` whose dimensions match `predictions`.
Returns:
Tuple of `predictions` and `labels`, possibly with last dim squeezed.
@@ -358,19 +358,19 @@ def with_shape(expected_shape, tensor):
def convert_to_tensor_or_sparse_tensor(
value, dtype=None, name=None, as_ref=False):
- """Converts value to a `SparseTensor` or `Output`.
+ """Converts value to a `SparseTensor` or `Tensor`.
Args:
value: A `SparseTensor`, `SparseTensorValue`, or an object whose type has a
- registered `Output` conversion function.
+ registered `Tensor` conversion function.
dtype: Optional element type for the returned tensor. If missing, the
type is inferred from the type of `value`.
- name: Optional name to use if a new `Output` is created.
+ name: Optional name to use if a new `Tensor` is created.
as_ref: True if we want the result as a ref tensor. Only used if a new
- `Output` is created.
+ `Tensor` is created.
Returns:
- A `SparseTensor` or `Output` based on `value`.
+ A `SparseTensor` or `Tensor` based on `value`.
Raises:
RuntimeError: If result type is incompatible with `dtype`.
diff --git a/tensorflow/contrib/framework/python/ops/ops.py b/tensorflow/contrib/framework/python/ops/ops.py
index 5659791c78..f403942fe7 100644
--- a/tensorflow/contrib/framework/python/ops/ops.py
+++ b/tensorflow/contrib/framework/python/ops/ops.py
@@ -36,7 +36,7 @@ def get_graph_from_inputs(op_input_list, graph=None):
`op_input_list`, we attempt to use the default graph.
Args:
- op_input_list: A list of inputs to an operation, which may include `Output`,
+ op_input_list: A list of inputs to an operation, which may include `Tensor`,
`Operation`, and other objects that may be converted to a graph element.
graph: (Optional) The explicit graph to use.
diff --git a/tensorflow/contrib/graph_editor/reroute.py b/tensorflow/contrib/graph_editor/reroute.py
index dd3e7ea7f4..5728435113 100644
--- a/tensorflow/contrib/graph_editor/reroute.py
+++ b/tensorflow/contrib/graph_editor/reroute.py
@@ -44,8 +44,8 @@ def _check_ts_compatibility(ts0, ts1):
"""Make sure the shape and dtype of the two tensor's lists are compatible.
Args:
- ts0: an object convertible to a list of `tf.Output`.
- ts1: an object convertible to a list of `tf.Output`.
+ ts0: an object convertible to a list of `tf.Tensor`.
+ ts1: an object convertible to a list of `tf.Tensor`.
Raises:
ValueError: if any pair of tensors (same index in ts0 and ts1) have
a dtype or a shape which is not compatible.
@@ -163,8 +163,8 @@ def _reroute_ts(ts0, ts1, mode, can_modify=None, cannot_modify=None):
Warning: this function is directly manipulating the internals of the tf.Graph.
Args:
- ts0: an object convertible to a list of `tf.Output`.
- ts1: an object convertible to a list of `tf.Output`.
+ ts0: an object convertible to a list of `tf.Tensor`.
+ ts1: an object convertible to a list of `tf.Tensor`.
mode: what to do with those tensors: "a->b" or "b<->a" for swaping and
"a->b" or "b->a" for one direction re-routing.
can_modify: iterable of operations which can be modified. Any operation
@@ -175,7 +175,7 @@ def _reroute_ts(ts0, ts1, mode, can_modify=None, cannot_modify=None):
Returns:
The number of individual modifications made by the function.
Raises:
- TypeError: if `ts0` or `ts1` cannot be converted to a list of `tf.Output`.
+ TypeError: if `ts0` or `ts1` cannot be converted to a list of `tf.Tensor`.
TypeError: if `can_modify` or `cannot_modify` is not `None` and cannot be
converted to a list of `tf.Operation`.
"""
@@ -215,8 +215,8 @@ def swap_ts(ts0, ts1, can_modify=None, cannot_modify=None):
A0 A1 A0 A1
Args:
- ts0: an object convertible to a list of `tf.Output`.
- ts1: an object convertible to a list of `tf.Output`.
+ ts0: an object convertible to a list of `tf.Tensor`.
+ ts1: an object convertible to a list of `tf.Tensor`.
can_modify: iterable of operations which can be modified. Any operation
outside within_ops will be left untouched by this function.
cannot_modify: iterable of operations which cannot be modified.
@@ -242,8 +242,8 @@ def reroute_a2b_ts(ts0, ts1, can_modify=None, cannot_modify=None):
The end of the tensors in ts1 are left dangling.
Args:
- ts0: an object convertible to a list of `tf.Output`.
- ts1: an object convertible to a list of `tf.Output`.
+ ts0: an object convertible to a list of `tf.Tensor`.
+ ts1: an object convertible to a list of `tf.Tensor`.
can_modify: iterable of operations which can be modified. Any operation
outside within_ops will be left untouched by this function.
cannot_modify: iterable of operations which cannot be modified. Any
@@ -268,8 +268,8 @@ def reroute_b2a_ts(ts0, ts1, can_modify=None, cannot_modify=None):
The end of the tensors in ts0 are left dangling.
Args:
- ts0: an object convertible to a list of `tf.Output`.
- ts1: an object convertible to a list of `tf.Output`.
+ ts0: an object convertible to a list of `tf.Tensor`.
+ ts1: an object convertible to a list of `tf.Tensor`.
can_modify: iterable of operations which can be modified. Any operation
outside within_ops will be left untouched by this function.
cannot_modify: iterable of operations which cannot be modified.
diff --git a/tensorflow/contrib/graph_editor/select.py b/tensorflow/contrib/graph_editor/select.py
index 8253bc1943..0e2914cb0d 100644
--- a/tensorflow/contrib/graph_editor/select.py
+++ b/tensorflow/contrib/graph_editor/select.py
@@ -119,7 +119,7 @@ def filter_ts(ops, positive_filter):
positive_filter: a function deciding whether to keep a tensor or not.
If `True`, all the tensors are returned.
Returns:
- A list of `tf.Output`.
+ A list of `tf.Tensor`.
Raises:
TypeError: if ops cannot be converted to a list of `tf.Operation`.
"""
@@ -616,7 +616,7 @@ def select_ops(*args, **kwargs):
Args:
*args: list of 1) regular expressions (compiled or not) or 2) (array of)
- `tf.Operation`. `tf.Output` instances are silently ignored.
+ `tf.Operation`. `tf.Tensor` instances are silently ignored.
**kwargs: 'graph': `tf.Graph` in which to perform the regex query.This is
required when using regex.
'positive_filter': an elem if selected only if `positive_filter(elem)` is
@@ -628,7 +628,7 @@ def select_ops(*args, **kwargs):
Raises:
TypeError: if the optional keyword argument graph is not a `tf.Graph`
or if an argument in args is not an (array of) `tf.Operation`
- or an (array of) `tf.Output` (silently ignored) or a string
+ or an (array of) `tf.Tensor` (silently ignored) or a string
or a regular expression.
ValueError: if one of the keyword arguments is unexpected or if a regular
expression is used without passing a graph as a keyword argument.
@@ -682,7 +682,7 @@ def select_ts(*args, **kwargs):
Args:
*args: list of 1) regular expressions (compiled or not) or 2) (array of)
- `tf.Output`. `tf.Operation` instances are silently ignored.
+ `tf.Tensor`. `tf.Operation` instances are silently ignored.
**kwargs: 'graph': `tf.Graph` in which to perform the regex query.This is
required when using regex.
'positive_filter': an elem if selected only if `positive_filter(elem)` is
@@ -690,10 +690,10 @@ def select_ts(*args, **kwargs):
'restrict_ts_regex': a regular expression is ignored if it doesn't start
with the substring "(?#ts)".
Returns:
- A list of `tf.Output`.
+ A list of `tf.Tensor`.
Raises:
TypeError: if the optional keyword argument graph is not a `tf.Graph`
- or if an argument in args is not an (array of) `tf.Output`
+ or if an argument in args is not an (array of) `tf.Tensor`
or an (array of) `tf.Operation` (silently ignored) or a string
or a regular expression.
ValueError: if one of the keyword arguments is unexpected or if a regular
@@ -758,10 +758,10 @@ def select_ops_and_ts(*args, **kwargs):
Returns:
A tuple `(ops, ts)` where:
`ops` is a list of `tf.Operation`, and
- `ts` is a list of `tf.Output`
+ `ts` is a list of `tf.Tensor`
Raises:
TypeError: if the optional keyword argument graph is not a `tf.Graph`
- or if an argument in args is not an (array of) `tf.Output`
+ or if an argument in args is not an (array of) `tf.Tensor`
or an (array of) `tf.Operation` or a string or a regular expression.
ValueError: if one of the keyword arguments is unexpected or if a regular
expression is used without passing a graph as a keyword argument.
diff --git a/tensorflow/contrib/graph_editor/subgraph.py b/tensorflow/contrib/graph_editor/subgraph.py
index e678823245..00a755c79f 100644
--- a/tensorflow/contrib/graph_editor/subgraph.py
+++ b/tensorflow/contrib/graph_editor/subgraph.py
@@ -165,14 +165,14 @@ class SubGraphView(object):
Args:
inside_ops: an object convertible to a list of `tf.Operation`. This list
defines all the operations in the subgraph.
- passthrough_ts: an object convertible to a list of `tf.Output`. This list
+ passthrough_ts: an object convertible to a list of `tf.Tensor`. This list
define all the "passthrough" tensors. A passthrough tensor is a tensor
which goes directly from the input of the subgraph to it output, without
any intermediate operations. All the non passthrough tensors are
silently ignored.
Raises:
TypeError: if inside_ops cannot be converted to a list of `tf.Operation`
- or if `passthrough_ts` cannot be converted to a list of `tf.Output`.
+ or if `passthrough_ts` cannot be converted to a list of `tf.Tensor`.
"""
inside_ops = util.make_list_of_op(inside_ops)
@@ -598,7 +598,7 @@ def make_view(*args, **kwargs):
Args:
*args: list of 1) regular expressions (compiled or not) or 2) (array of)
- `tf.Operation` 3) (array of) `tf.Output`. Those objects will be converted
+ `tf.Operation` 3) (array of) `tf.Tensor`. Those objects will be converted
into a list of operations and a list of candidate for passthrough tensors.
**kwargs: keyword graph is used 1) to check that the ops and ts are from
the correct graph 2) for regular expression query
@@ -606,7 +606,7 @@ def make_view(*args, **kwargs):
A subgraph view.
Raises:
TypeError: if the optional keyword argument graph is not a `tf.Graph`
- or if an argument in args is not an (array of) `tf.Output`
+ or if an argument in args is not an (array of) `tf.Tensor`
or an (array of) `tf.Operation` or a string or a regular expression.
ValueError: if one of the keyword arguments is unexpected.
"""
diff --git a/tensorflow/contrib/graph_editor/transform.py b/tensorflow/contrib/graph_editor/transform.py
index b62b15d22c..26047437d7 100644
--- a/tensorflow/contrib/graph_editor/transform.py
+++ b/tensorflow/contrib/graph_editor/transform.py
@@ -89,7 +89,7 @@ def assign_renamed_collections_handler(info, elem, elem_):
Args:
info: Transform._Info instance.
- elem: the original element (`tf.Output` or `tf.Operation`)
+ elem: the original element (`tf.Tensor` or `tf.Operation`)
elem_: the transformed element
"""
# TODO(fkp): handle known special cases
diff --git a/tensorflow/contrib/graph_editor/util.py b/tensorflow/contrib/graph_editor/util.py
index a72d0e34b4..11ee2435c9 100644
--- a/tensorflow/contrib/graph_editor/util.py
+++ b/tensorflow/contrib/graph_editor/util.py
@@ -210,7 +210,7 @@ def make_list_of_op(ops, check_graph=True, allow_graph=True, ignore_ts=False):
operation.
check_graph: if `True` check if all the operations belong to the same graph.
allow_graph: if `False` a `tf.Graph` cannot be converted.
- ignore_ts: if True, silently ignore `tf.Output`.
+ ignore_ts: if True, silently ignore `tf.Tensor`.
Returns:
A newly created list of `tf.Operation`.
Raises:
@@ -241,7 +241,7 @@ def get_tensors(graph):
Args:
graph: a `tf.Graph`.
Returns:
- A list of `tf.Output`.
+ A list of `tf.Tensor`.
Raises:
TypeError: if graph is not a `tf.Graph`.
"""
@@ -254,17 +254,17 @@ def get_tensors(graph):
def make_list_of_t(ts, check_graph=True, allow_graph=True, ignore_ops=False):
- """Convert ts to a list of `tf.Output`.
+ """Convert ts to a list of `tf.Tensor`.
Args:
- ts: can be an iterable of `tf.Output`, a `tf.Graph` or a single tensor.
+ ts: can be an iterable of `tf.Tensor`, a `tf.Graph` or a single tensor.
check_graph: if `True` check if all the tensors belong to the same graph.
allow_graph: if `False` a `tf.Graph` cannot be converted.
ignore_ops: if `True`, silently ignore `tf.Operation`.
Returns:
- A newly created list of `tf.Output`.
+ A newly created list of `tf.Tensor`.
Raises:
- TypeError: if `ts` cannot be converted to a list of `tf.Output` or,
+ TypeError: if `ts` cannot be converted to a list of `tf.Tensor` or,
if `check_graph` is `True`, if all the ops do not belong to the same graph.
"""
if isinstance(ts, tf_ops.Graph):
@@ -287,11 +287,11 @@ def get_generating_ops(ts):
"""Return all the generating ops of the tensors in `ts`.
Args:
- ts: a list of `tf.Output`
+ ts: a list of `tf.Tensor`
Returns:
A list of all the generating `tf.Operation` of the tensors in `ts`.
Raises:
- TypeError: if `ts` cannot be converted to a list of `tf.Output`.
+ TypeError: if `ts` cannot be converted to a list of `tf.Tensor`.
"""
ts = make_list_of_t(ts, allow_graph=False)
return [t.op for t in ts]
@@ -301,11 +301,11 @@ def get_consuming_ops(ts):
"""Return all the consuming ops of the tensors in ts.
Args:
- ts: a list of `tf.Output`
+ ts: a list of `tf.Tensor`
Returns:
A list of all the consuming `tf.Operation` of the tensors in `ts`.
Raises:
- TypeError: if ts cannot be converted to a list of `tf.Output`.
+ TypeError: if ts cannot be converted to a list of `tf.Tensor`.
"""
ts = make_list_of_t(ts, allow_graph=False)
ops = []
@@ -434,14 +434,14 @@ def make_placeholder_from_tensor(t, scope=None):
Note that the correct graph scope must be set by the calling function.
Args:
- t: a `tf.Output` whose name will be used to create the placeholder
+ t: a `tf.Tensor` whose name will be used to create the placeholder
(see function placeholder_name).
scope: absolute scope within which to create the placeholder. None
means that the scope of `t` is preserved. `""` means the root scope.
Returns:
A newly created `tf.placeholder`.
Raises:
- TypeError: if `t` is not `None` or a `tf.Output`.
+ TypeError: if `t` is not `None` or a `tf.Tensor`.
"""
return tf_array_ops.placeholder(
dtype=t.dtype, shape=t.get_shape(), name=placeholder_name(
diff --git a/tensorflow/contrib/labeled_tensor/python/ops/core.py b/tensorflow/contrib/labeled_tensor/python/ops/core.py
index fef8f60dc7..870dbdd383 100644
--- a/tensorflow/contrib/labeled_tensor/python/ops/core.py
+++ b/tensorflow/contrib/labeled_tensor/python/ops/core.py
@@ -519,7 +519,7 @@ LabeledTensorLike = tc.Union(LabeledTensor, ops.Output, np.ndarray, Scalar)
def convert_to_labeled_tensor(value, dtype=None, name=None):
"""Converts the given `value` to a `LabeledTensor`.
- This function accepts `LabeledTensor` objects, 0-dimensional `Output` objects
+ This function accepts `LabeledTensor` objects, 0-dimensional `Tensor` objects
and numpy arrays, and Python scalars. Higher dimensional unlabeled tensors
must use the `LabeledTensor` constructor explicitly.
diff --git a/tensorflow/contrib/layers/python/layers/embedding_ops.py b/tensorflow/contrib/layers/python/layers/embedding_ops.py
index 4dc52ad8cd..8c064c9370 100644
--- a/tensorflow/contrib/layers/python/layers/embedding_ops.py
+++ b/tensorflow/contrib/layers/python/layers/embedding_ops.py
@@ -202,9 +202,9 @@ def hashed_embedding_lookup(params, values, dimension, name=None,
partitioned in 4 tensors with length `[3, 3, 2, 2]`.
Args:
- params: An `Output`, `list` of `Output`s, or `PartitionedVariable`.
+ params: A `Tensor`, `list` of `Tensors`, or `PartitionedVariable`.
Each tensor must be of rank 1 with fully-defined shape.
- values: `Output` of values to be embedded.
+ values: `Tensor` of values to be embedded.
dimension: Embedding dimension
name: An optional name for this op.
hash_key: Specify the hash_key that will be used by the `FingerprintCat64`
@@ -278,7 +278,7 @@ def hashed_embedding_lookup_sparse(params,
See `tf.contrib.layers.hashed_embedding_lookup` for embedding with hashing.
Args:
- params: An `Output`, `list` of `Output`s, or `PartitionedVariable`.
+ params: A `Tensor`, `list` of `Tensors`, or `PartitionedVariable`.
Each tensor must be of rank 1 with fully-defined shape.
sparse_values: A 2-D `SparseTensor` containing the values to be embedded.
Some rows may be empty.
@@ -358,12 +358,12 @@ def embedding_lookup_unique(params, ids, name=None):
Args:
params: A list of tensors with the same shape and type, or a
`PartitionedVariable`. Shape `[index, d1, d2, ...]`.
- ids: A one-dimensional `Output` with type `int32` or `int64` containing
+ ids: A one-dimensional `Tensor` with type `int32` or `int64` containing
the ids to be looked up in `params`. Shape `[ids1, ids2, ...]`.
name: A name for this operation (optional).
Returns:
- An `Output` with the same type as the tensors in `params` and dimension of
+ A `Tensor` with the same type as the tensors in `params` and dimension of
`[ids1, ids2, d1, d2, ...]`.
Raises:
diff --git a/tensorflow/contrib/layers/python/layers/encoders.py b/tensorflow/contrib/layers/python/layers/encoders.py
index efb7ab2855..8b6abb4b45 100644
--- a/tensorflow/contrib/layers/python/layers/encoders.py
+++ b/tensorflow/contrib/layers/python/layers/encoders.py
@@ -41,7 +41,7 @@ def bow_encoder(ids,
"""Maps a sequence of symbols to a vector per example by averaging embeddings.
Args:
- ids: `[batch_size, doc_length]` `Output` or `SparseTensor` of type
+ ids: `[batch_size, doc_length]` `Tensor` or `SparseTensor` of type
`int32` or `int64` with symbol ids.
vocab_size: Integer number of symbols in vocabulary.
embed_dim: Integer number of dimensions for embedding matrix.
@@ -59,7 +59,7 @@ def bow_encoder(ids,
reuse: If `True`, variables inside the op will be reused.
Returns:
- Encoding `Output` `[batch_size, embed_dim]` produced by
+ Encoding `Tensor` `[batch_size, embed_dim]` produced by
averaging embeddings.
Raises:
@@ -102,7 +102,7 @@ def embed_sequence(ids,
Typical use case would be reusing embeddings between an encoder and decoder.
Args:
- ids: `[batch_size, doc_length]` `Output` of type `int32` or `int64`
+ ids: `[batch_size, doc_length]` `Tensor` of type `int32` or `int64`
with symbol ids.
vocab_size: Integer number of symbols in vocabulary.
embed_dim: Integer number of dimensions for embedding matrix.
@@ -118,7 +118,7 @@ def embed_sequence(ids,
reuse: If `True`, variables inside the op will be reused.
Returns:
- `Output` of `[batch_size, doc_length, embed_dim]` with embedded sequences.
+ `Tensor` of `[batch_size, doc_length, embed_dim]` with embedded sequences.
Raises:
ValueError: if `embed_dim` or `vocab_size` are not specified when not
diff --git a/tensorflow/contrib/layers/python/layers/feature_column.py b/tensorflow/contrib/layers/python/layers/feature_column.py
index 6ce67a2616..4c375adf2f 100644
--- a/tensorflow/contrib/layers/python/layers/feature_column.py
+++ b/tensorflow/contrib/layers/python/layers/feature_column.py
@@ -786,7 +786,7 @@ class _OneHotColumn(_FeatureColumn,
in `insert_transformed_feature`. Rank should be >= `output_rank`.
unused_weight_collections: Unused. One hot encodings are not variable.
unused_trainable: Unused. One hot encodings are not trainable.
- output_rank: the desired rank of the output `Output`.
+ output_rank: the desired rank of the output `Tensor`.
Returns:
A multihot Tensor to be fed into the first layer of neural network.
@@ -844,7 +844,7 @@ class _EmbeddingColumn(_FeatureColumn, collections.namedtuple(
ckpt_to_load_from: (Optional). String representing checkpoint name/pattern
to restore the column weights. Required if `tensor_name_in_ckpt` is not
None.
- tensor_name_in_ckpt: (Optional). Name of the `Output` in the provided
+ tensor_name_in_ckpt: (Optional). Name of the `Tensor` in the provided
checkpoint from which to restore the column weights. Required if
`ckpt_to_load_from` is not None.
shared_embedding_name: (Optional). The common name for shared embedding.
@@ -981,7 +981,7 @@ def embedding_column(sparse_id_column,
ckpt_to_load_from: (Optional). String representing checkpoint name/pattern
to restore the column weights. Required if `tensor_name_in_ckpt` is not
None.
- tensor_name_in_ckpt: (Optional). Name of the `Output` in the provided
+ tensor_name_in_ckpt: (Optional). Name of the `Tensor` in the provided
checkpoint from which to restore the column weights. Required if
`ckpt_to_load_from` is not None.
@@ -1027,7 +1027,7 @@ def shared_embedding_columns(sparse_id_columns,
ckpt_to_load_from: (Optional). String representing checkpoint name/pattern
to restore the column weights. Required if `tensor_name_in_ckpt` is not
None.
- tensor_name_in_ckpt: (Optional). Name of the `Output` in the provided
+ tensor_name_in_ckpt: (Optional). Name of the `Tensor` in the provided
checkpoint from which to restore the column weights. Required if
`ckpt_to_load_from` is not None.
@@ -1193,7 +1193,7 @@ def hashed_embedding_column(column_name,
def _reshape_real_valued_tensor(input_tensor, output_rank, column_name=None):
- """Reshaping logic for dense, numeric `Output`s.
+ """Reshaping logic for dense, numeric `Tensors`.
Follows the following rules:
1. If `output_rank > input_rank + 1` raise a `ValueError`.
@@ -1201,15 +1201,15 @@ def _reshape_real_valued_tensor(input_tensor, output_rank, column_name=None):
dimension and return
3. If `output_rank == input_rank`, return `input_tensor`.
4. If `output_rank < input_rank`, flatten the inner dimensions of
- `input_tensor` and return an `Output` with `output_rank`
+ `input_tensor` and return a `Tensor` with `output_rank`
Args:
- input_tensor: a dense `Output` to be reshaped.
- output_rank: the desired rank of the reshaped `Output`.
+ input_tensor: a dense `Tensor` to be reshaped.
+ output_rank: the desired rank of the reshaped `Tensor`.
column_name: (optional) the name of the associated column. Used for error
messages.
Returns:
- An `Output` with the same entries as `input_tensor` and rank `output_rank`.
+ A `Tensor` with the same entries as `input_tensor` and rank `output_rank`.
Raises:
ValueError: if `output_rank > input_rank + 1`.
"""
@@ -1607,7 +1607,7 @@ class _CrossedColumn(_FeatureColumn,
ckpt_to_load_from: (Optional). String representing checkpoint name/pattern
to restore the column weights. Required if `tensor_name_in_ckpt` is not
None.
- tensor_name_in_ckpt: (Optional). Name of the `Output` in the provided
+ tensor_name_in_ckpt: (Optional). Name of the `Tensor` in the provided
checkpoint from which to restore the column weights. Required if
`ckpt_to_load_from` is not None.
@@ -1756,7 +1756,7 @@ def crossed_column(columns, hash_bucket_size, combiner=None,
ckpt_to_load_from: (Optional). String representing checkpoint name/pattern
to restore the column weights. Required if `tensor_name_in_ckpt` is not
None.
- tensor_name_in_ckpt: (Optional). Name of the `Output` in the provided
+ tensor_name_in_ckpt: (Optional). Name of the `Tensor` in the provided
checkpoint from which to restore the column weights. Required if
`ckpt_to_load_from` is not None.
hash_key: Specify the hash_key that will be used by the `FingerprintCat64`
diff --git a/tensorflow/contrib/layers/python/layers/feature_column_ops.py b/tensorflow/contrib/layers/python/layers/feature_column_ops.py
index 207e0a773b..c084faee1e 100644
--- a/tensorflow/contrib/layers/python/layers/feature_column_ops.py
+++ b/tensorflow/contrib/layers/python/layers/feature_column_ops.py
@@ -50,7 +50,7 @@ def _embeddings_from_arguments(column,
args: the _DeepEmbeddingLookupArguments for this column.
weight_collections: collections to store weights in.
trainable: whether these embeddings should be trainable.
- output_rank: the desired rank of the returned `Output`. Inner dimensions will
+ output_rank: the desired rank of the returned `Tensor`. Inner dimensions will
be combined to produce the desired rank.
Returns:
@@ -616,7 +616,7 @@ def parse_feature_columns_from_examples(serialized,
the serialized protos in the batch.
Returns:
- A `dict` mapping FeatureColumn to `Output` and `SparseTensor` values.
+ A `dict` mapping FeatureColumn to `Tensor` and `SparseTensor` values.
"""
check_feature_columns(feature_columns)
columns_to_tensors = parsing_ops.parse_example(
@@ -672,7 +672,7 @@ def transform_features(features, feature_columns):
should be instances of classes derived from _FeatureColumn.
Returns:
- A `dict` mapping FeatureColumn to `Output` and `SparseTensor` values.
+ A `dict` mapping FeatureColumn to `Tensor` and `SparseTensor` values.
"""
check_feature_columns(feature_columns)
columns_to_tensor = features.copy()
@@ -710,9 +710,9 @@ def parse_feature_columns_from_sequence_examples(
Returns:
A tuple consisting of:
context_features: a dict mapping `FeatureColumns` from
- `context_feature_columns` to their parsed `Output`s/`SparseTensor`s.
+ `context_feature_columns` to their parsed `Tensors`/`SparseTensor`s.
sequence_features: a dict mapping `FeatureColumns` from
- `sequence_feature_columns` to their parsed `Output`s/`SparseTensor`s.
+ `sequence_feature_columns` to their parsed `Tensors`/`SparseTensor`s.
"""
# Sequence example parsing requires a single (scalar) example.
try:
diff --git a/tensorflow/contrib/layers/python/layers/layers.py b/tensorflow/contrib/layers/python/layers/layers.py
index 8fcac3d9cc..f754452d6e 100644
--- a/tensorflow/contrib/layers/python/layers/layers.py
+++ b/tensorflow/contrib/layers/python/layers/layers.py
@@ -106,7 +106,7 @@ def avg_pool2d(inputs,
scope: Optional scope for name_scope.
Returns:
- An `Output` representing the results of the pooling operation.
+ A `Tensor` representing the results of the pooling operation.
Raises:
ValueError: if `data_format` is neither `NHWC` nor `NCHW`.
@@ -202,7 +202,7 @@ def _fused_batch_norm(
scope: Optional scope for `variable_scope`.
Returns:
- An `Output` representing the output of the operation.
+ A `Tensor` representing the output of the operation.
Raises:
ValueError: if `data_format` is neither `NHWC` nor `NCHW`.
@@ -309,7 +309,7 @@ def _fused_batch_norm(
_fused_batch_norm_training,
_fused_batch_norm_inference)
- # If `is_training` doesn't have a constant value, because it is an `Output`,
+ # If `is_training` doesn't have a constant value, because it is a `Tensor`,
# a `Variable` or `Placeholder` then is_training_value will be None and
# `need_updates` will be true.
is_training_value = utils.constant_value(is_training)
@@ -431,7 +431,7 @@ def batch_norm(
scope: Optional scope for `variable_scope`.
Returns:
- An `Output` representing the output of the operation.
+ A `Tensor` representing the output of the operation.
Raises:
ValueError: if `batch_weights` is not None and `fused` is True.
@@ -553,7 +553,7 @@ def batch_norm(
finally:
variable_scope.get_variable_scope().set_partitioner(partitioner)
- # If `is_training` doesn't have a constant value, because it is an `Output`,
+ # If `is_training` doesn't have a constant value, because it is a `Tensor`,
# a `Variable` or `Placeholder` then is_training_value will be None and
# `needs_moments` will be true.
is_training_value = utils.constant_value(is_training)
@@ -732,7 +732,7 @@ def convolution(inputs,
`convolution` creates a variable called `weights`, representing the
convolutional kernel, that is convolved (actually cross-correlated) with the
- `inputs` to produce an `Output` of activations. If a `normalizer_fn` is
+ `inputs` to produce a `Tensor` of activations. If a `normalizer_fn` is
provided (such as `batch_norm`), it is then applied. Otherwise, if
`normalizer_fn` is None and a `biases_initializer` is provided then a `biases`
variable would be created and added the activations. Finally, if
@@ -922,7 +922,7 @@ def convolution2d_in_plane(
scope: Optional scope for `variable_scope`.
Returns:
- An `Output` representing the output of the operation.
+ A `Tensor` representing the output of the operation.
"""
with variable_scope.variable_scope(
scope, 'ConvInPlane', [inputs], reuse=reuse) as sc:
@@ -992,7 +992,7 @@ def convolution2d_transpose(
second variable called 'biases' is added to the result of the operation.
Args:
- inputs: A 4-D `Output` of type `float` and shape
+ inputs: A 4-D `Tensor` of type `float` and shape
`[batch, height, width, in_channels]` for `NHWC` data format or
`[batch, in_channels, height, width]` for `NCHW` data format.
num_outputs: integer, the number of output filters.
@@ -1131,11 +1131,11 @@ def dropout(inputs,
Args:
inputs: the tensor to pass to the nn.dropout op.
- keep_prob: A scalar `Output` with the same type as x. The probability
+ keep_prob: A scalar `Tensor` with the same type as x. The probability
that each element is kept.
- noise_shape: A 1-D `Output` of type `int32`, representing the
+ noise_shape: A 1-D `Tensor` of type `int32`, representing the
shape for randomly generated keep/drop flags.
- is_training: A bool `Output` indicating whether or not the model
+ is_training: A bool `Tensor` indicating whether or not the model
is in training mode. If so, dropout is applied and values scaled.
Otherwise, inputs is returned.
outputs_collections: collection to add the outputs.
@@ -1235,16 +1235,16 @@ def _inner_flatten(inputs, new_rank, output_collections=None, scope=None):
rank of `inputs`.
Args:
- inputs: an `Output` or `SparseTensor`.
- new_rank: the desired rank of the returned `Output` or `SparseTensor`.
+ inputs: a `Tensor` or `SparseTensor`.
+ new_rank: the desired rank of the returned `Tensor` or `SparseTensor`.
output_collections: collection to which the outputs will be added.
scope: optional scope for `name_scope`.
Returns:
- An `Output` or `SparseTensor` conataining the same values as `inputs`, but
+ A `Tensor` or `SparseTensor` conataining the same values as `inputs`, but
with innermost dimensions flattened to obtain rank `new_rank`.
Raises:
- TypeError: `inputs` is not an `Output` or `SparseTensor`.
+ TypeError: `inputs` is not a `Tensor` or `SparseTensor`.
"""
with ops.name_scope(scope, 'InnerFlatten', [inputs, new_rank]) as sc:
if isinstance(inputs, sparse_tensor.SparseTensor):
@@ -1274,7 +1274,7 @@ def fully_connected(inputs,
`fully_connected` creates a variable called `weights`, representing a fully
connected weight matrix, which is multiplied by the `inputs` to produce a
- `Output` of hidden units. If a `normalizer_fn` is provided (such as
+ `Tensor` of hidden units. If a `normalizer_fn` is provided (such as
`batch_norm`), it is then applied. Otherwise, if `normalizer_fn` is
None and a `biases_initializer` is provided then a `biases` variable would be
created and added the hidden units. Finally, if `activation_fn` is not `None`,
@@ -1403,7 +1403,7 @@ def layer_norm(inputs,
scope: Optional scope for `variable_scope`.
Returns:
- An `Output` representing the output of the operation.
+ A `Tensor` representing the output of the operation.
Raises:
ValueError: if rank or last dimension of `inputs` is undefined.
@@ -1484,7 +1484,7 @@ def max_pool2d(inputs,
scope: Optional scope for name_scope.
Returns:
- An `Output` representing the results of the pooling operation.
+ A `Tensor` representing the results of the pooling operation.
Raises:
ValueError: if `data_format` is neither `NHWC` nor `NCHW`.
@@ -1551,7 +1551,7 @@ def pool(inputs,
scope: Optional scope for name_scope.
Returns:
- An `Output` representing the results of the pooling operation.
+ A `Tensor` representing the results of the pooling operation.
Raises:
ValueError: if arguments are invalid.
@@ -1637,7 +1637,7 @@ def repeat(inputs, repetitions, layer, *args, **kwargs):
layers are called with `scope='stack'`.
Args:
- inputs: An `Output` suitable for layer.
+ inputs: A `Tensor` suitable for layer.
repetitions: Int, number of repetitions.
layer: A layer with arguments `(inputs, *args, **kwargs)`
*args: Extra args for the layer.
@@ -1727,7 +1727,7 @@ def separable_convolution2d(
scope: Optional scope for variable_scope.
Returns:
- An `Output` representing the output of the operation.
+ A `Tensor` representing the output of the operation.
"""
with variable_scope.variable_scope(
scope, 'SeparableConv2d', [inputs], reuse=reuse) as sc:
@@ -1800,11 +1800,11 @@ def softmax(logits, scope=None):
needs to have a specified number of elements (number of classes).
Args:
- logits: N-dimensional `Output` with logits, where N > 1.
+ logits: N-dimensional `Tensor` with logits, where N > 1.
scope: Optional scope for variable_scope.
Returns:
- an `Output` with same shape and type as logits.
+ a `Tensor` with same shape and type as logits.
"""
# TODO(jrru): Add axis argument which defaults to last dimension.
with variable_scope.variable_scope(scope, 'softmax', [logits]):
@@ -1838,13 +1838,13 @@ def stack(inputs, layer, stack_args, **kwargs):
layers are called with `scope='stack'`.
Args:
- inputs: An `Output` suitable for layer.
+ inputs: A `Tensor` suitable for layer.
layer: A layer with arguments `(inputs, *args, **kwargs)`
stack_args: A list/tuple of parameters for each call of layer.
**kwargs: Extra kwargs for the layer.
Returns:
- an `Output` result of applying the stacked layers.
+ a `Tensor` result of applying the stacked layers.
Raises:
ValueError: if the op is unknown or wrong.
@@ -1878,13 +1878,13 @@ def unit_norm(inputs, dim, epsilon=1e-7, scope=None):
Note that the rank of `input` must be known.
Args:
- inputs: An `Output` of arbitrary size.
+ inputs: A `Tensor` of arbitrary size.
dim: The dimension along which the input is normalized.
epsilon: A small value to add to the inputs to avoid dividing by zero.
scope: Optional scope for variable_scope.
Returns:
- The normalized `Output`.
+ The normalized `Tensor`.
Raises:
ValueError: If dim is smaller than the number of dimensions in 'inputs'.
@@ -1960,7 +1960,7 @@ def legacy_fully_connected(x,
collection.
Args:
- x: The input `Output`.
+ x: The input `Tensor`.
num_output_units: The size of the output.
activation_fn: activation function, default set to None to skip it and
maintain a linear activation.
diff --git a/tensorflow/contrib/layers/python/layers/layers_test.py b/tensorflow/contrib/layers/python/layers/layers_test.py
index ab0f35cbbf..fb96f19744 100644
--- a/tensorflow/contrib/layers/python/layers/layers_test.py
+++ b/tensorflow/contrib/layers/python/layers/layers_test.py
@@ -1322,7 +1322,7 @@ def _sparsify(array, threshold=0.5):
class PartialFlattenTest(tf.test.TestCase):
def testDensePartialFlatten(self):
- """Test `_inner_flatten` on `Output`s."""
+ """Test `_inner_flatten` on `Tensor`s."""
shape = [2, 3, 4, 5, 6]
np.random.seed(5446)
inputs = np.random.randint(0, 100, size=shape)
diff --git a/tensorflow/contrib/layers/python/layers/optimizers.py b/tensorflow/contrib/layers/python/layers/optimizers.py
index 1bd66977e1..2908096c6c 100644
--- a/tensorflow/contrib/layers/python/layers/optimizers.py
+++ b/tensorflow/contrib/layers/python/layers/optimizers.py
@@ -74,7 +74,7 @@ def optimize_loss(loss,
- string, name of the optimizer like 'SGD', 'Adam', see OPTIMIZER_CLS_NAMES
for full list. E.g. `optimize_loss(..., optimizer='Adam')`.
- - function, takes learning rate `Output` as argument and must return
+ - function, takes learning rate `Tensor` as argument and must return
`Optimizer` instance. E.g. `optimize_loss(...,
optimizer=lambda lr: tf.train.MomentumOptimizer(lr, momentum=0.5))`.
Alternatively, if `learning_rate` is `None`, the function takes no
@@ -87,13 +87,13 @@ def optimize_loss(loss,
E.g., `optimizer_loss(..., optimizer=tf.train.AdagradOptimizer(0.5))`.
Args:
- loss: Scalar `Output`.
- global_step: Scalar int `Output`, step counter for each update. If not
+ loss: Scalar `Tensor`.
+ global_step: Scalar int `Tensor`, step counter for each update. If not
supplied, it will be fetched from the default graph (see
`tf.contrib.framework.get_global_step` for details). If it's
not been created, no step will be incremented with each weight
update. `learning_rate_decay_fn` requires `global_step`.
- learning_rate: float or `Output`, magnitude of update per each training
+ learning_rate: float or `Tensor`, magnitude of update per each training
step. Can be `None`.
optimizer: string, class or optimizer instance, used as trainer.
string should be name of optimizer, like 'SGD',
@@ -114,7 +114,7 @@ def optimize_loss(loss,
This callable takes a `list` of `(gradients, variables)` `tuple`s and
returns the same thing with the gradients modified.
learning_rate_decay_fn: function, takes `learning_rate` and `global_step`
- `Output`s, returns `Output`.
+ `Tensor`s, returns `Tensor`.
Can be used to implement any learning rate decay
functions.
For example: `tf.train.exponential_decay`.
diff --git a/tensorflow/contrib/layers/python/layers/regularizers.py b/tensorflow/contrib/layers/python/layers/regularizers.py
index e45b237e53..86d0516774 100644
--- a/tensorflow/contrib/layers/python/layers/regularizers.py
+++ b/tensorflow/contrib/layers/python/layers/regularizers.py
@@ -40,7 +40,7 @@ def l1_regularizer(scale, scope=None):
L1 regularization encourages sparsity.
Args:
- scale: A scalar multiplier `Output`. 0.0 disables the regularizer.
+ scale: A scalar multiplier `Tensor`. 0.0 disables the regularizer.
scope: An optional scope name.
Returns:
@@ -79,7 +79,7 @@ def l2_regularizer(scale, scope=None):
Small values of L2 can help prevent overfitting the training data.
Args:
- scale: A scalar multiplier `Output`. 0.0 disables the regularizer.
+ scale: A scalar multiplier `Tensor`. 0.0 disables the regularizer.
scope: An optional scope name.
Returns:
@@ -113,8 +113,8 @@ def l1_l2_regularizer(scale_l1=1.0, scale_l2=1.0, scope=None):
"""Returns a function that can be used to apply L1 L2 regularizations.
Args:
- scale_l1: A scalar multiplier `Output` for L1 regularization.
- scale_l2: A scalar multiplier `Output` for L2 regularization.
+ scale_l1: A scalar multiplier `Tensor` for L1 regularization.
+ scale_l2: A scalar multiplier `Tensor` for L2 regularization.
scope: An optional scope name.
Returns:
@@ -163,9 +163,9 @@ def apply_regularization(regularizer, weights_list=None):
subtraction, it usually shouldn't hurt much either.
Args:
- regularizer: A function that takes a single `Output` argument and returns
- a scalar `Output` output.
- weights_list: List of weights `Output`s or `Variables` to apply
+ regularizer: A function that takes a single `Tensor` argument and returns
+ a scalar `Tensor` output.
+ weights_list: List of weights `Tensors` or `Variables` to apply
`regularizer` over. Defaults to the `GraphKeys.WEIGHTS` collection if
`None`.
diff --git a/tensorflow/contrib/layers/python/layers/utils.py b/tensorflow/contrib/layers/python/layers/utils.py
index 4e86f71e3e..e2a6eda7c2 100644
--- a/tensorflow/contrib/layers/python/layers/utils.py
+++ b/tensorflow/contrib/layers/python/layers/utils.py
@@ -40,7 +40,7 @@ NamedOutputs = namedtuple('NamedOutputs', ['name', 'outputs'])
def collect_named_outputs(collections, alias, outputs):
- """Add `Output` outputs tagged with alias to collections.
+ """Add `Tensor` outputs tagged with alias to collections.
It is useful to collect end-points or tags for summaries. Example of usage:
@@ -70,7 +70,7 @@ def gather_tensors_alias(tensors):
If the tensor does not have an alias it would default to its name.
Args:
- tensors: A list of `Output`s.
+ tensors: A list of `Tensors`.
Returns:
A list of strings with the alias of each tensor.
@@ -84,7 +84,7 @@ def get_tensor_alias(tensor):
If the tensor does not have an alias it would default to its name.
Args:
- tensor: An `Output`.
+ tensor: A `Tensor`.
Returns:
A string with the alias of the tensor.
@@ -116,7 +116,7 @@ def constant_value(value_or_tensor_or_var, dtype=None):
"""Returns value if value_or_tensor_or_var has a constant value.
Args:
- value_or_tensor_or_var: A value, an `Output` or a `Variable`.
+ value_or_tensor_or_var: A value, a `Tensor` or a `Variable`.
dtype: Optional `tf.dtype`, if set it would check it has the right
dtype.
diff --git a/tensorflow/contrib/layers/python/ops/bucketization_op.py b/tensorflow/contrib/layers/python/ops/bucketization_op.py
index ae7dd446cc..6d232da4ad 100644
--- a/tensorflow/contrib/layers/python/ops/bucketization_op.py
+++ b/tensorflow/contrib/layers/python/ops/bucketization_op.py
@@ -31,12 +31,12 @@ def bucketize(input_tensor, boundaries, name=None):
See bucketize_op.cc for more details.
Args:
- input_tensor: An `Output` which will be bucketize.
+ input_tensor: A `Tensor` which will be bucketize.
boundaries: A list of floats gives the boundaries. It has to be sorted.
name: A name prefix for the returned tensors (optional).
Returns:
- An `Output` with type int32 which indicates the corresponding bucket for
+ A `Tensor` with type int32 which indicates the corresponding bucket for
each value in `input_tensor`.
Raises:
diff --git a/tensorflow/contrib/layers/python/ops/sparse_feature_cross_op.py b/tensorflow/contrib/layers/python/ops/sparse_feature_cross_op.py
index 709d96e401..e4141c6b6d 100644
--- a/tensorflow/contrib/layers/python/ops/sparse_feature_cross_op.py
+++ b/tensorflow/contrib/layers/python/ops/sparse_feature_cross_op.py
@@ -50,7 +50,7 @@ def sparse_feature_cross(inputs, hashed_output=False, num_buckets=0,
See sparse_feature_cross_kernel.cc for more details.
Args:
- inputs: List of `SparseTensor` or `Output` to be crossed.
+ inputs: List of `SparseTensor` or `Tensor` to be crossed.
hashed_output: If true, returns the hash of the cross instead of the string.
This will allow us avoiding string manipulations.
num_buckets: It is used if hashed_output is true.
diff --git a/tensorflow/contrib/layers/python/ops/sparse_ops.py b/tensorflow/contrib/layers/python/ops/sparse_ops.py
index a2c637468f..325f5ac97b 100644
--- a/tensorflow/contrib/layers/python/ops/sparse_ops.py
+++ b/tensorflow/contrib/layers/python/ops/sparse_ops.py
@@ -41,7 +41,7 @@ def dense_to_sparse_tensor(dense_tensor, ignore_value=None):
"""Converts a dense Tensor to a SparseTensor, dropping ignore_value cells.
Args:
- dense_tensor: An `Output`.
+ dense_tensor: A `Tensor`.
ignore_value: Entries in `dense_tensor` equal to this value will be
absent from the return `SparseTensor`. If `None`, default value of
dense_tensor's dtype will be used (e.g. '' for `str`, 0 for `int`).
diff --git a/tensorflow/contrib/learn/python/learn/dataframe/queues/feeding_functions.py b/tensorflow/contrib/learn/python/learn/dataframe/queues/feeding_functions.py
index 1b98fae702..46e1def77e 100644
--- a/tensorflow/contrib/learn/python/learn/dataframe/queues/feeding_functions.py
+++ b/tensorflow/contrib/learn/python/learn/dataframe/queues/feeding_functions.py
@@ -194,8 +194,8 @@ def enqueue_data(data,
"""Creates a queue filled from a numpy array or pandas `DataFrame`.
Returns a queue filled with the rows of the given array or `DataFrame`. In
- the case of a pandas `DataFrame`, the first enqueued `Output` corresponds to
- the index of the `DataFrame`. For numpy arrays, the first enqueued `Output`
+ the case of a pandas `DataFrame`, the first enqueued `Tensor` corresponds to
+ the index of the `DataFrame`. For numpy arrays, the first enqueued `Tensor`
contains the row number.
Args:
diff --git a/tensorflow/contrib/learn/python/learn/dataframe/queues/feeding_queue_runner.py b/tensorflow/contrib/learn/python/learn/dataframe/queues/feeding_queue_runner.py
index 31a2cf8fd6..72f3bbc3f4 100644
--- a/tensorflow/contrib/learn/python/learn/dataframe/queues/feeding_queue_runner.py
+++ b/tensorflow/contrib/learn/python/learn/dataframe/queues/feeding_queue_runner.py
@@ -44,7 +44,7 @@ class FeedingQueueRunner(qr.QueueRunner):
close_op: Op to close the queue. Pending enqueue ops are preserved.
cancel_op: Op to close the queue and cancel pending enqueue ops.
feed_fns: a list of functions that return a dictionary mapping fed
- `Output`s to values. Must be the same length as `enqueue_ops`.
+ `Tensor`s to values. Must be the same length as `enqueue_ops`.
queue_closed_exception_types: Optional tuple of Exception types that
indicate that the queue has been closed when raised during an enqueue
operation. Defaults to
diff --git a/tensorflow/contrib/learn/python/learn/dataframe/tensorflow_dataframe.py b/tensorflow/contrib/learn/python/learn/dataframe/tensorflow_dataframe.py
index 3e14d651c5..b17a4b8d05 100644
--- a/tensorflow/contrib/learn/python/learn/dataframe/tensorflow_dataframe.py
+++ b/tensorflow/contrib/learn/python/learn/dataframe/tensorflow_dataframe.py
@@ -144,7 +144,7 @@ class TensorFlowDataFrame(df.DataFrame):
'''
Args:
- boolean_series: a `Series` that evaluates to a boolean `Output`.
+ boolean_series: a `Series` that evaluates to a boolean `Tensor`.
Returns:
A new `DataFrame` with the same columns as `self`, but selecting only the
diff --git a/tensorflow/contrib/learn/python/learn/dataframe/transform.py b/tensorflow/contrib/learn/python/learn/dataframe/transform.py
index 39a782d93e..c28da59ac7 100644
--- a/tensorflow/contrib/learn/python/learn/dataframe/transform.py
+++ b/tensorflow/contrib/learn/python/learn/dataframe/transform.py
@@ -171,7 +171,7 @@ class Transform(object):
Note this output type is used both for `__call__`, in which case the
values are `TransformedSeries`, and for `apply_transform`, in which case
- the values are `Output`s.
+ the values are `Tensor`s.
Returns:
A namedtuple type fixing the order and names of the outputs of this
diff --git a/tensorflow/contrib/learn/python/learn/dataframe/transforms/batch.py b/tensorflow/contrib/learn/python/learn/dataframe/transforms/batch.py
index 448f06fad5..200ec57b67 100644
--- a/tensorflow/contrib/learn/python/learn/dataframe/transforms/batch.py
+++ b/tensorflow/contrib/learn/python/learn/dataframe/transforms/batch.py
@@ -64,7 +64,7 @@ class Batch(AbstractBatchTransform):
Note that dimension 0 is assumed to correspond to "example number" so
`Batch` does not prepend an additional dimension to incoming `Series`.
- For example, if an `Output` in `transform_input` has shape [x, y], the
+ For example, if a `Tensor` in `transform_input` has shape [x, y], the
corresponding output will have shape [batch_size, y].
"""
@@ -91,7 +91,7 @@ class ShuffleBatch(AbstractBatchTransform):
Note that dimension 0 is assumed to correspond to "example number" so
`ShuffleBatch` does not prepend an additional dimension to incoming `Series`.
- For example, if an `Output` in `transform_input` has shape [x, y], the
+ For example, if a `Tensor` in `transform_input` has shape [x, y], the
corresponding output will have shape [batch_size, y].
"""
diff --git a/tensorflow/contrib/learn/python/learn/dataframe/transforms/boolean_mask.py b/tensorflow/contrib/learn/python/learn/dataframe/transforms/boolean_mask.py
index 18b81f8010..130ac0c90f 100644
--- a/tensorflow/contrib/learn/python/learn/dataframe/transforms/boolean_mask.py
+++ b/tensorflow/contrib/learn/python/learn/dataframe/transforms/boolean_mask.py
@@ -35,7 +35,7 @@ def sparse_boolean_mask(sparse_tensor, mask, name="sparse_boolean_mask"):
Args:
sparse_tensor: a `SparseTensor`.
- mask: a 1D boolean dense`Output` whose length is equal to the 0th dimension
+ mask: a 1D boolean dense`Tensor` whose length is equal to the 0th dimension
of `sparse_tensor`.
name: optional name for this operation.
Returns:
diff --git a/tensorflow/contrib/learn/python/learn/dataframe/transforms/reader_source.py b/tensorflow/contrib/learn/python/learn/dataframe/transforms/reader_source.py
index 74a0f770ef..e8fa402bd6 100644
--- a/tensorflow/contrib/learn/python/learn/dataframe/transforms/reader_source.py
+++ b/tensorflow/contrib/learn/python/learn/dataframe/transforms/reader_source.py
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-"""`ReaderSource` produces `Output`s of keys and values using a `tf.Reader`."""
+"""`ReaderSource` produces `Tensor`s of keys and values using a `tf.Reader`."""
from __future__ import absolute_import
from __future__ import division
@@ -24,7 +24,7 @@ from tensorflow.python.training import input as input_ops
class ReaderSource(transform.TensorFlowTransform):
- """Produces `Output`s of keys and values using a `tf.Reader`."""
+ """Produces `Tensor`s of keys and values using a `tf.Reader`."""
def __init__(self,
reader_cls,
diff --git a/tensorflow/contrib/learn/python/learn/estimators/classifier.py b/tensorflow/contrib/learn/python/learn/estimators/classifier.py
index 55dca2f527..f62764043f 100644
--- a/tensorflow/contrib/learn/python/learn/estimators/classifier.py
+++ b/tensorflow/contrib/learn/python/learn/estimators/classifier.py
@@ -34,9 +34,9 @@ def classification_signature_fn(examples, unused_features, predictions):
"""Creates classification signature from given examples and predictions.
Args:
- examples: `Output`.
- unused_features: `dict` of `Output`s.
- predictions: `dict` of `Output`s.
+ examples: `Tensor`.
+ unused_features: `dict` of `Tensor`s.
+ predictions: `dict` of `Tensor`s.
Returns:
Tuple of default classification signature and empty named signatures.
diff --git a/tensorflow/contrib/learn/python/learn/estimators/dnn.py b/tensorflow/contrib/learn/python/learn/estimators/dnn.py
index af6216fc5e..f23adc0c34 100644
--- a/tensorflow/contrib/learn/python/learn/estimators/dnn.py
+++ b/tensorflow/contrib/learn/python/learn/estimators/dnn.py
@@ -68,8 +68,8 @@ def _dnn_model_fn(features, labels, mode, params):
"""Deep Neural Net model_fn.
Args:
- features: `Output` or dict of `Output` (depends on data passed to `fit`).
- labels: `Output` of shape [batch_size, 1] or [batch_size] labels of
+ features: `Tensor` or dict of `Tensor` (depends on data passed to `fit`).
+ labels: `Tensor` of shape [batch_size, 1] or [batch_size] labels of
dtype `int32` or `int64` in the range `[0, n_classes)`.
mode: Defines whether this is training, evaluation or prediction.
See `ModeKeys`.
@@ -91,7 +91,7 @@ def _dnn_model_fn(features, labels, mode, params):
* num_ps_replicas: The number of parameter server replicas.
Returns:
- predictions: A dict of `Output` objects.
+ predictions: A dict of `Tensor` objects.
loss: A scalar containing the loss of the step.
train_op: The op for training.
"""
@@ -211,7 +211,7 @@ class DNNClassifier(evaluable.Evaluable, trainable.Trainable):
otherwise there will be a `KeyError`:
* if `weight_column_name` is not `None`, a feature with
- `key=weight_column_name` whose value is an `Output`.
+ `key=weight_column_name` whose value is a `Tensor`.
* for each `column` in `feature_columns`:
- if `column` is a `SparseColumn`, a feature with `key=column.name`
whose `value` is a `SparseTensor`.
@@ -219,7 +219,7 @@ class DNNClassifier(evaluable.Evaluable, trainable.Trainable):
`key` the id column name, the second with `key` the weight column name.
Both features' `value` must be a `SparseTensor`.
- if `column` is a `RealValuedColumn`, a feature with `key=column.name`
- whose `value` is an `Output`.
+ whose `value` is a `Tensor`.
"""
def __init__(self,
@@ -401,7 +401,7 @@ class DNNClassifier(evaluable.Evaluable, trainable.Trainable):
name: string, name of the tensor.
Returns:
- `Output` object.
+ `Tensor` object.
"""
return self._estimator.get_variable_value(name)
@@ -510,7 +510,7 @@ class DNNRegressor(dnn_linear_combined.DNNLinearCombinedRegressor):
otherwise there will be a `KeyError`:
* if `weight_column_name` is not `None`, a feature with
- `key=weight_column_name` whose value is an `Output`.
+ `key=weight_column_name` whose value is a `Tensor`.
* for each `column` in `feature_columns`:
- if `column` is a `SparseColumn`, a feature with `key=column.name`
whose `value` is a `SparseTensor`.
@@ -518,7 +518,7 @@ class DNNRegressor(dnn_linear_combined.DNNLinearCombinedRegressor):
`key` the id column name, the second with `key` the weight column name.
Both features' `value` must be a `SparseTensor`.
- if `column` is a `RealValuedColumn`, a feature with `key=column.name`
- whose `value` is an `Output`.
+ whose `value` is a `Tensor`.
"""
def __init__(self,
diff --git a/tensorflow/contrib/learn/python/learn/estimators/dnn_linear_combined.py b/tensorflow/contrib/learn/python/learn/estimators/dnn_linear_combined.py
index 3d0d1f22a1..10b288f1fb 100644
--- a/tensorflow/contrib/learn/python/learn/estimators/dnn_linear_combined.py
+++ b/tensorflow/contrib/learn/python/learn/estimators/dnn_linear_combined.py
@@ -54,7 +54,7 @@ class _DNNLinearCombinedBaseEstimator(estimator.BaseEstimator):
Input of `fit`, `train`, and `evaluate` should have following features,
otherwise there will be a `KeyError`:
if `weight_column_name` is not `None`, a feature with
- `key=weight_column_name` whose value is an `Output`.
+ `key=weight_column_name` whose value is a `Tensor`.
for each `column` in `dnn_feature_columns` + `linear_feature_columns`:
- if `column` is a `SparseColumn`, a feature with `key=column.name`
whose `value` is a `SparseTensor`.
@@ -62,7 +62,7 @@ class _DNNLinearCombinedBaseEstimator(estimator.BaseEstimator):
`key` the id column name, the second with `key` the weight column
name. Both features' `value` must be a `SparseTensor`.
- if `column` is a `RealValuedColumn, a feature with `key=column.name`
- whose `value` is an `Output`.
+ whose `value` is a `Tensor`.
"""
def __init__(self, # _joint_linear_weights pylint: disable=invalid-name
@@ -369,8 +369,8 @@ def _dnn_linear_combined_model_fn(features, labels, mode, params):
"""Deep Neural Net and Linear combined model_fn.
Args:
- features: `Output` or dict of `Output` (depends on data passed to `fit`).
- labels: `Output` of shape [batch_size, 1] or [batch_size] labels of dtype
+ features: `Tensor` or dict of `Tensor` (depends on data passed to `fit`).
+ labels: `Tensor` of shape [batch_size, 1] or [batch_size] labels of dtype
`int32` or `int64` in the range `[0, n_classes)`.
mode: Defines whether this is training, evaluation or prediction.
See `ModeKeys`.
@@ -586,7 +586,7 @@ class DNNLinearCombinedClassifier(evaluable.Evaluable, trainable.Trainable):
Input of `fit` and `evaluate` should have following features,
otherwise there will be a `KeyError`:
if `weight_column_name` is not `None`, a feature with
- `key=weight_column_name` whose value is an `Output`.
+ `key=weight_column_name` whose value is a `Tensor`.
for each `column` in `dnn_feature_columns` + `linear_feature_columns`:
- if `column` is a `SparseColumn`, a feature with `key=column.name`
whose `value` is a `SparseTensor`.
@@ -594,7 +594,7 @@ class DNNLinearCombinedClassifier(evaluable.Evaluable, trainable.Trainable):
`key` the id column name, the second with `key` the weight column name.
Both features' `value` must be a `SparseTensor`.
- if `column` is a `RealValuedColumn, a feature with `key=column.name`
- whose `value` is an `Output`.
+ whose `value` is a `Tensor`.
"""
def __init__(self, # _joint_linear_weights pylint: disable=invalid-name
@@ -802,7 +802,7 @@ class DNNLinearCombinedClassifier(evaluable.Evaluable, trainable.Trainable):
name: string, name of the tensor.
Returns:
- `Output` object.
+ `Tensor` object.
"""
return self._estimator.get_variable_value(name)
@@ -946,7 +946,7 @@ class DNNLinearCombinedRegressor(_DNNLinearCombinedBaseEstimator):
Input of `fit`, `train`, and `evaluate` should have following features,
otherwise there will be a `KeyError`:
if `weight_column_name` is not `None`, a feature with
- `key=weight_column_name` whose value is an `Output`.
+ `key=weight_column_name` whose value is a `Tensor`.
for each `column` in `dnn_feature_columns` + `linear_feature_columns`:
- if `column` is a `SparseColumn`, a feature with `key=column.name`
whose `value` is a `SparseTensor`.
@@ -954,7 +954,7 @@ class DNNLinearCombinedRegressor(_DNNLinearCombinedBaseEstimator):
`key` the id column name, the second with `key` the weight column name.
Both features' `value` must be a `SparseTensor`.
- if `column` is a `RealValuedColumn, a feature with `key=column.name`
- whose `value` is an `Output`.
+ whose `value` is a `Tensor`.
"""
def __init__(self, # _joint_linear_weights pylint: disable=invalid-name
diff --git a/tensorflow/contrib/learn/python/learn/estimators/dynamic_rnn_estimator.py b/tensorflow/contrib/learn/python/learn/estimators/dynamic_rnn_estimator.py
index fbcf665e60..e49d157919 100644
--- a/tensorflow/contrib/learn/python/learn/estimators/dynamic_rnn_estimator.py
+++ b/tensorflow/contrib/learn/python/learn/estimators/dynamic_rnn_estimator.py
@@ -64,12 +64,12 @@ def padding_mask(sequence_lengths, padded_length):
"""Creates a mask used for calculating losses with padded input.
Args:
- sequence_lengths: An `Output` of shape `[batch_size]` containing the
- unpadded length of each sequence.
- padded_length: A scalar `Output` indicating the length of the sequences
+ sequence_lengths: A `Tensor` of shape `[batch_size]` containing the unpadded
+ length of each sequence.
+ padded_length: A scalar `Tensor` indicating the length of the sequences
after padding
Returns:
- A boolean `Output` M of shape `[batch_size, padded_length]` where
+ A boolean `Tensor` M of shape `[batch_size, padded_length]` where
`M[i, j] == True` when `lengths[i] > j`.
"""
@@ -84,7 +84,7 @@ def mask_activations_and_labels(activations, labels, sequence_lengths):
Args:
activations: Output of the RNN, shape `[batch_size, padded_length, k]`.
labels: Label values, shape `[batch_size, padded_length]`.
- sequence_lengths: An `Output` of shape `[batch_size]` with the unpadded
+ sequence_lengths: A `Tensor` of shape `[batch_size]` with the unpadded
length of each sequence. If `None`, then each sequence is unpadded.
Returns:
@@ -116,15 +116,15 @@ def mask_activations_and_labels(activations, labels, sequence_lengths):
def select_last_activations(activations, sequence_lengths):
"""Selects the nth set of activations for each n in `sequence_length`.
- Reuturns an `Output` of shape `[batch_size, k]`. If `sequence_length` is not
+ Reuturns a `Tensor` of shape `[batch_size, k]`. If `sequence_length` is not
`None`, then `output[i, :] = activations[i, sequence_length[i], :]`. If
`sequence_length` is `None`, then `output[i, :] = activations[i, -1, :]`.
Args:
- activations: An `Output` with shape `[batch_size, padded_length, k]`.
- sequence_lengths: An `Output` with shape `[batch_size]` or `None`.
+ activations: A `Tensor` with shape `[batch_size, padded_length, k]`.
+ sequence_lengths: A `Tensor` with shape `[batch_size]` or `None`.
Returns:
- An `Output` of shape `[batch_size, k]`.
+ A `Tensor` of shape `[batch_size, k]`.
"""
with ops.name_scope('select_last_activations',
values=[activations, sequence_lengths]):
@@ -151,12 +151,12 @@ def _concatenate_context_input(sequence_input, context_input):
returned.
Args:
- sequence_input: An `Output` of dtype `float32` and shape `[batch_size,
+ sequence_input: A `Tensor` of dtype `float32` and shape `[batch_size,
padded_length, d0]`.
- context_input: An `Output` of dtype `float32` and shape `[batch_size, d1]`.
+ context_input: A `Tensor` of dtype `float32` and shape `[batch_size, d1]`.
Returns:
- An `Output` of dtype `float32` and shape `[batch_size, padded_length,
+ A `Tensor` of dtype `float32` and shape `[batch_size, padded_length,
d0 + d1]`.
Raises:
@@ -212,7 +212,7 @@ def build_sequence_input(features,
weight_collections: List of graph collections to which weights are added.
scope: Optional scope, passed through to parsing ops.
Returns:
- An `Output` of dtype `float32` and shape `[batch_size, padded_length, ?]`.
+ A `Tensor` of dtype `float32` and shape `[batch_size, padded_length, ?]`.
This will be used as input to an RNN.
"""
sequence_input = layers.sequence_input_from_feature_columns(
@@ -242,7 +242,7 @@ def construct_rnn(initial_state,
Args:
initial_state: The initial state to pass the the RNN. If `None`, the
default starting state for `self._cell` is used.
- sequence_input: An `Output` with shape `[batch_size, padded_length, d]`
+ sequence_input: A `Tensor` with shape `[batch_size, padded_length, d]`
that will be passed as input to the RNN.
cell: An initialized `RNNCell`.
num_label_columns: The desired output dimension.
@@ -280,7 +280,7 @@ def _mask_multivalue(sequence_length, metric):
"""Wrapper function that masks values by `sequence_length`.
Args:
- sequence_length: An `Output` with shape `[batch_size]` and dtype `int32`
+ sequence_length: A `Tensor` with shape `[batch_size]` and dtype `int32`
containing the length of each sequence in the batch. If `None`, sequences
are assumed to be unpadded.
metric: A metric function. Its signature must contain `predictions` and
@@ -305,7 +305,7 @@ def _get_default_metrics(problem_type, prediction_type, sequence_length):
problem_type: `ProblemType.CLASSIFICATION` or`ProblemType.REGRESSION`.
prediction_type: `PredictionType.SINGLE_VALUE` or
`PredictionType.MULTIPLE_VALUE`.
- sequence_length: An `Output` with shape `[batch_size]` and dtype `int32`
+ sequence_length: A `Tensor` with shape `[batch_size]` and dtype `int32`
containing the length of each sequence in the batch. If `None`, sequences
are assumed to be unpadded.
Returns:
@@ -341,7 +341,7 @@ def _multi_value_predictions(
If `predict_probabilities` is `False`, this function returns a `dict`
containing single entry with key `PREDICTIONS_KEY`. If `predict_probabilities`
is `True`, it will contain a second entry with key `PROBABILITIES_KEY`. The
- value of this entry is an `Output` of probabilities with shape
+ value of this entry is a `Tensor` of probabilities with shape
`[batch_size, padded_length, num_classes]`.
Note that variable length inputs will yield some predictions that don't have
@@ -356,7 +356,7 @@ def _multi_value_predictions(
should be returned. Should only be set to `True` for
classification/logistic regression problems.
Returns:
- A `dict` mapping strings to `Output`s.
+ A `dict` mapping strings to `Tensors`.
"""
with ops.name_scope('MultiValuePrediction'):
activations_shape = array_ops.shape(activations)
@@ -389,13 +389,13 @@ def _single_value_predictions(
If `predict_probabilities` is `False`, this function returns a `dict`
containing single entry with key `PREDICTIONS_KEY`. If `predict_probabilities`
is `True`, it will contain a second entry with key `PROBABILITIES_KEY`. The
- value of this entry is an `Output` of probabilities with shape
+ value of this entry is a `Tensor` of probabilities with shape
`[batch_size, num_classes]`.
Args:
activations: Output from an RNN. Should have dtype `float32` and shape
`[batch_size, padded_length, ?]`.
- sequence_length: An `Output` with shape `[batch_size]` and dtype `int32`
+ sequence_length: A `Tensor` with shape `[batch_size]` and dtype `int32`
containing the length of each sequence in the batch. If `None`, sequences
are assumed to be unpadded.
target_column: An initialized `TargetColumn`, calculate predictions.
@@ -403,7 +403,7 @@ def _single_value_predictions(
should be returned. Should only be set to `True` for
classification/logistic regression problems.
Returns:
- A `dict` mapping strings to `Output`s.
+ A `dict` mapping strings to `Tensors`.
"""
with ops.name_scope('SingleValuePrediction'):
last_activations = select_last_activations(activations, sequence_length)
@@ -427,15 +427,15 @@ def _multi_value_loss(
Args:
activations: Output from an RNN. Should have dtype `float32` and shape
`[batch_size, padded_length, ?]`.
- labels: An `Output` with length `[batch_size, padded_length]`.
- sequence_length: An `Output` with shape `[batch_size]` and dtype `int32`
+ labels: A `Tensor` with length `[batch_size, padded_length]`.
+ sequence_length: A `Tensor` with shape `[batch_size]` and dtype `int32`
containing the length of each sequence in the batch. If `None`, sequences
are assumed to be unpadded.
target_column: An initialized `TargetColumn`, calculate predictions.
features: A `dict` containing the input and (optionally) sequence length
information and initial state.
Returns:
- A scalar `Output` containing the loss.
+ A scalar `Tensor` containing the loss.
"""
with ops.name_scope('MultiValueLoss'):
activations_masked, labels_masked = mask_activations_and_labels(
@@ -450,15 +450,15 @@ def _single_value_loss(
Args:
activations: Output from an RNN. Should have dtype `float32` and shape
`[batch_size, padded_length, ?]`.
- labels: An `Output` with length `[batch_size]`.
- sequence_length: An `Output` with shape `[batch_size]` and dtype `int32`
+ labels: A `Tensor` with length `[batch_size]`.
+ sequence_length: A `Tensor` with shape `[batch_size]` and dtype `int32`
containing the length of each sequence in the batch. If `None`, sequences
are assumed to be unpadded.
target_column: An initialized `TargetColumn`, calculate predictions.
features: A `dict` containing the input and (optionally) sequence length
information and initial state.
Returns:
- A scalar `Output` containing the loss.
+ A scalar `Tensor` containing the loss.
"""
with ops.name_scope('SingleValueLoss'):
diff --git a/tensorflow/contrib/learn/python/learn/estimators/estimator.py b/tensorflow/contrib/learn/python/learn/estimators/estimator.py
index 53ebc2efad..6b5b241936 100644
--- a/tensorflow/contrib/learn/python/learn/estimators/estimator.py
+++ b/tensorflow/contrib/learn/python/learn/estimators/estimator.py
@@ -127,8 +127,8 @@ def infer_real_valued_columns_from_input_fn(input_fn):
Args:
input_fn: Input function returning a tuple of:
- features - Dictionary of string feature name to `Output` or `Output`.
- labels - `Output` of label values.
+ features - Dictionary of string feature name to `Tensor` or `Tensor`.
+ labels - `Tensor` of label values.
Returns:
List of `FeatureColumn` objects.
@@ -454,7 +454,7 @@ class BaseEstimator(
Returns:
A numpy array of predicted classes or regression values if the
- constructor's `model_fn` returns an `Output` for `predictions` or a `dict`
+ constructor's `model_fn` returns a `Tensor` for `predictions` or a `dict`
of numpy arrays if `model_fn` returns a `dict`. Returns an iterable of
predictions if as_iterable is True.
@@ -515,20 +515,20 @@ class BaseEstimator(
export_dir: A string containing a directory to write the exported graph
and checkpoints.
input_fn: If `use_deprecated_input_fn` is true, then a function that given
- `Output` of `Example` strings, parses it into features that are then
+ `Tensor` of `Example` strings, parses it into features that are then
passed to the model. Otherwise, a function that takes no argument and
returns a tuple of (features, labels), where features is a dict of
- string key to `Output` and labels is an `Output` that's currently not
+ string key to `Tensor` and labels is a `Tensor` that's currently not
used (and so can be `None`).
input_feature_key: Only used if `use_deprecated_input_fn` is false. String
key into the features dict returned by `input_fn` that corresponds to a
- the raw `Example` strings `Output` that the exported model will take as
+ the raw `Example` strings `Tensor` that the exported model will take as
input. Can only be `None` if you're using a custom `signature_fn` that
does not use the first arg (examples).
use_deprecated_input_fn: Determines the signature format of `input_fn`.
signature_fn: Function that returns a default signature and a named
- signature map, given `Output` of `Example` strings, `dict` of `Output`s
- for features and `Output` or `dict` of `Output`s for predictions.
+ signature map, given `Tensor` of `Example` strings, `dict` of `Tensor`s
+ for features and `Tensor` or `dict` of `Tensor`s for predictions.
prediction_key: The key for a tensor in the `predictions` dict (output
from the `model_fn`) to use as the `predictions` input to the
`signature_fn`. Optional. If `None`, predictions will pass to
@@ -562,8 +562,8 @@ class BaseEstimator(
Expected to be overriden by sub-classes that require custom support.
Args:
- features: `Output` or `dict` of `Output` objects.
- labels: `Output` or `dict` of `Output` objects.
+ features: `Tensor` or `dict` of `Tensor` objects.
+ labels: `Tensor` or `dict` of `Tensor` objects.
Returns:
A `ModelFnOps` object.
@@ -575,7 +575,7 @@ class BaseEstimator(
"""Method that builds model graph and returns prediction ops.
Args:
- features: `Output` or `dict` of `Output` objects.
+ features: `Tensor` or `dict` of `Tensor` objects.
Returns:
A `ModelFnOps` object.
@@ -588,8 +588,8 @@ class BaseEstimator(
Expected to be overriden by sub-classes that require custom support.
Args:
- features: `Output` or `dict` of `Output` objects.
- labels: `Output` or `dict` of `Output` objects.
+ features: `Tensor` or `dict` of `Tensor` objects.
+ labels: `Tensor` or `dict` of `Tensor` objects.
metrics: Dict of metrics to run. If None, the default metric functions
are used; if {}, no metrics are used. Otherwise, `metrics` should map
friendly names for the metric to a `MetricSpec` object defining which
@@ -619,7 +619,7 @@ class BaseEstimator(
examples_batch: batch of tf.Example
Returns:
- features: `Output` or `dict` of `Output` objects.
+ features: `Tensor` or `dict` of `Tensor` objects.
Raises:
ValueError: If `_features_info` attribute is not available (usually
@@ -934,9 +934,9 @@ class Estimator(BaseEstimator):
Args:
model_fn: Model function. Follows the signature:
* Args:
- * `features` are single `Output` or `dict` of `Output`s
+ * `features` are single `Tensor` or `dict` of `Tensor`s
(depending on data passed to `fit`),
- * `labels` are `Output` or `dict` of `Output`s (for multi-head
+ * `labels` are `Tensor` or `dict` of `Tensor`s (for multi-head
models). If mode is `ModeKeys.INFER`, `labels=None` will be
passed. If the `model_fn`'s signature does not accept
`mode`, the `model_fn` must still be able to handle
@@ -952,11 +952,11 @@ class Estimator(BaseEstimator):
Also supports a legacy signature which returns tuple of:
- * predictions: `Output`, `SparseTensor` or dictionary of same.
- Can also be any type that is convertible to an `Output` or
+ * predictions: `Tensor`, `SparseTensor` or dictionary of same.
+ Can also be any type that is convertible to a `Tensor` or
`SparseTensor`, or dictionary of same.
- * loss: Scalar loss `Output`.
- * train_op: Training update `Output` or `Operation`.
+ * loss: Scalar loss `Tensor`.
+ * train_op: Training update `Tensor` or `Operation`.
Supports next three signatures for the function:
@@ -1043,8 +1043,8 @@ class Estimator(BaseEstimator):
build model.
Args:
- features: `Output` or `dict` of `Output` objects.
- labels: `Output` or `dict` of `Output` objects.
+ features: `Tensor` or `dict` of `Tensor` objects.
+ labels: `Tensor` or `dict` of `Tensor` objects.
Returns:
`ModelFnOps` object.
@@ -1059,8 +1059,8 @@ class Estimator(BaseEstimator):
build model.
Args:
- features: `Output` or `dict` of `Output` objects.
- labels: `Output` or `dict` of `Output` objects.
+ features: `Tensor` or `dict` of `Tensor` objects.
+ labels: `Tensor` or `dict` of `Tensor` objects.
metrics: Dict of metrics to run. If None, the default metric functions
are used; if {}, no metrics are used. Otherwise, `metrics` should map
friendly names for the metric to a `MetricSpec` object defining which
@@ -1097,7 +1097,7 @@ class Estimator(BaseEstimator):
build model.
Args:
- features: `Output` or `dict` of `Output` objects.
+ features: `Tensor` or `dict` of `Tensor` objects.
Returns:
`ModelFnOps` object.
diff --git a/tensorflow/contrib/learn/python/learn/estimators/head.py b/tensorflow/contrib/learn/python/learn/estimators/head.py
index edb91ca49a..e7d9eb4f34 100644
--- a/tensorflow/contrib/learn/python/learn/estimators/head.py
+++ b/tensorflow/contrib/learn/python/learn/estimators/head.py
@@ -305,7 +305,7 @@ class _RegressionHead(_Head):
name: Op name.
Returns:
- A loss `Output`.
+ A loss `Tensor`.
"""
labels = _check_labels(labels, self._label_name)
@@ -349,10 +349,10 @@ class _RegressionHead(_Head):
"""Returns a dict of predictions.
Args:
- logits: logits `Output` before applying possible centered bias.
+ logits: logits `Tensor` before applying possible centered bias.
Returns:
- Dict of prediction `Output` keyed by `PredictionKey`.
+ Dict of prediction `Tensor` keyed by `PredictionKey`.
"""
if self._enable_centered_bias:
logits = nn.bias_add(logits, _centered_bias(
@@ -364,10 +364,10 @@ class _RegressionHead(_Head):
"""Returns a dict of predictions.
Args:
- logits: logits `Output` after applying possible centered bias.
+ logits: logits `Tensor` after applying possible centered bias.
Returns:
- Dict of prediction `Output` keyed by `PredictionKey`.
+ Dict of prediction `Tensor` keyed by `PredictionKey`.
"""
predictions = {}
if self.logits_dimension == 1:
@@ -490,7 +490,7 @@ class _MultiClassHead(_Head):
name: Op name.
Returns:
- A loss `Output`.
+ A loss `Tensor`.
"""
labels = _check_labels(labels, self._label_name)
@@ -534,10 +534,10 @@ class _MultiClassHead(_Head):
"""Returns a dict of predictions.
Args:
- logits: logits `Output` before applying possible centered bias.
+ logits: logits `Tensor` before applying possible centered bias.
Returns:
- Dict of prediction `Output` keyed by `PredictionKey`.
+ Dict of prediction `Tensor` keyed by `PredictionKey`.
"""
if self._enable_centered_bias:
logits = nn.bias_add(logits, _centered_bias(
@@ -549,10 +549,10 @@ class _MultiClassHead(_Head):
"""Returns a dict of predictions.
Args:
- logits: logits `Output` after applying possible centered bias.
+ logits: logits `Tensor` after applying possible centered bias.
Returns:
- Dict of prediction `Output` keyed by `PredictionKey`.
+ Dict of prediction `Tensor` keyed by `PredictionKey`.
"""
predictions = {prediction_key.PredictionKey.LOGITS: logits}
if self.logits_dimension == 1:
diff --git a/tensorflow/contrib/learn/python/learn/estimators/linear.py b/tensorflow/contrib/learn/python/learn/estimators/linear.py
index e1bf477079..a1175c327d 100644
--- a/tensorflow/contrib/learn/python/learn/estimators/linear.py
+++ b/tensorflow/contrib/learn/python/learn/estimators/linear.py
@@ -85,8 +85,8 @@ def _linear_model_fn(features, labels, mode, params):
"""A model_fn for linear models that use a gradient-based optimizer.
Args:
- features: `Output` or dict of `Output` (depends on data passed to `fit`).
- labels: `Output` of shape [batch_size, 1] or [batch_size] labels of
+ features: `Tensor` or dict of `Tensor` (depends on data passed to `fit`).
+ labels: `Tensor` of shape [batch_size, 1] or [batch_size] labels of
dtype `int32` or `int64` in the range `[0, n_classes)`.
mode: Defines whether this is training, evaluation or prediction.
See `ModeKeys`.
@@ -161,8 +161,8 @@ def sdca_model_fn(features, labels, mode, params):
"""A model_fn for linear models that use the SDCA optimizer.
Args:
- features: A dict of `Output` keyed by column name.
- labels: `Output` of shape [batch_size, 1] or [batch_size] labels of
+ features: A dict of `Tensor` keyed by column name.
+ labels: `Tensor` of shape [batch_size, 1] or [batch_size] labels of
dtype `int32` or `int64` in the range `[0, n_classes)`.
mode: Defines whether this is training, evaluation or prediction.
See `ModeKeys`.
@@ -309,7 +309,7 @@ class LinearClassifier(evaluable.Evaluable, trainable.Trainable):
otherwise there will be a `KeyError`:
* if `weight_column_name` is not `None`, a feature with
- `key=weight_column_name` whose value is an `Output`.
+ `key=weight_column_name` whose value is a `Tensor`.
* for each `column` in `feature_columns`:
- if `column` is a `SparseColumn`, a feature with `key=column.name`
whose `value` is a `SparseTensor`.
@@ -317,7 +317,7 @@ class LinearClassifier(evaluable.Evaluable, trainable.Trainable):
`key` the id column name, the second with `key` the weight column name.
Both features' `value` must be a `SparseTensor`.
- if `column` is a `RealValuedColumn`, a feature with `key=column.name`
- whose `value` is an `Output`.
+ whose `value` is a `Tensor`.
"""
def __init__(self, # _joint_weight pylint: disable=invalid-name
@@ -581,7 +581,7 @@ class LinearRegressor(evaluable.Evaluable, trainable.Trainable):
otherwise there will be a KeyError:
* if `weight_column_name` is not `None`:
- key=weight_column_name, value=an `Output`
+ key=weight_column_name, value=a `Tensor`
* for column in `feature_columns`:
- if isinstance(column, `SparseColumn`):
key=column.name, value=a `SparseTensor`
@@ -589,7 +589,7 @@ class LinearRegressor(evaluable.Evaluable, trainable.Trainable):
{key=id column name, value=a `SparseTensor`,
key=weight column name, value=a `SparseTensor`}
- if isinstance(column, `RealValuedColumn`):
- key=column.name, value=an `Output`
+ key=column.name, value=a `Tensor`
"""
def __init__(self, # _joint_weights: pylint: disable=invalid-name
diff --git a/tensorflow/contrib/learn/python/learn/estimators/model_fn.py b/tensorflow/contrib/learn/python/learn/estimators/model_fn.py
index 75aa7c860c..3f9351ce22 100644
--- a/tensorflow/contrib/learn/python/learn/estimators/model_fn.py
+++ b/tensorflow/contrib/learn/python/learn/estimators/model_fn.py
@@ -59,11 +59,11 @@ class ModelFnOps(collections.namedtuple(
Args:
mode: One of `ModeKeys`. Specifies if this training, evaluation or
prediction.
- predictions: Predictions `Output` or dict of `Output`.
- loss: Training loss `Output`.
+ predictions: Predictions `Tensor` or dict of `Tensor`.
+ loss: Training loss `Tensor`.
train_op: Op for the training step.
eval_metric_ops: Dict of metric results keyed by name. The values of the
- dict are the results of calling a metric function, such as `Output`.
+ dict are the results of calling a metric function, such as `Tensor`.
signature_fn: The signature_fn used for exporting.
Returns:
diff --git a/tensorflow/contrib/learn/python/learn/estimators/random_forest.py b/tensorflow/contrib/learn/python/learn/estimators/random_forest.py
index e6fddf49f3..c2c41255c9 100644
--- a/tensorflow/contrib/learn/python/learn/estimators/random_forest.py
+++ b/tensorflow/contrib/learn/python/learn/estimators/random_forest.py
@@ -45,7 +45,7 @@ def _assert_float32(tensors):
"""Assert all tensors are float32.
Args:
- tensors: `Output` or `dict` of `Output` objects.
+ tensors: `Tensor` or `dict` of `Tensor` objects.
Raises:
TypeError: if any tensor is not float32.
diff --git a/tensorflow/contrib/learn/python/learn/estimators/svm.py b/tensorflow/contrib/learn/python/learn/estimators/svm.py
index fc20547899..eeee673c5a 100644
--- a/tensorflow/contrib/learn/python/learn/estimators/svm.py
+++ b/tensorflow/contrib/learn/python/learn/estimators/svm.py
@@ -85,15 +85,15 @@ class SVM(trainable.Trainable, evaluable.Evaluable):
Input of `fit` and `evaluate` should have following features, otherwise there
will be a `KeyError`:
- a feature with `key=example_id_column` whose value is an `Output` of dtype
+ a feature with `key=example_id_column` whose value is a `Tensor` of dtype
string.
if `weight_column_name` is not `None`, a feature with
- `key=weight_column_name` whose value is an `Output`.
+ `key=weight_column_name` whose value is a `Tensor`.
for each `column` in `feature_columns`:
- if `column` is a `SparseColumn`, a feature with `key=column.name`
whose `value` is a `SparseTensor`.
- if `column` is a `RealValuedColumn, a feature with `key=column.name`
- whose `value` is an `Output`.
+ whose `value` is a `Tensor`.
"""
def __init__(self,
diff --git a/tensorflow/contrib/learn/python/learn/estimators/tensor_signature.py b/tensorflow/contrib/learn/python/learn/estimators/tensor_signature.py
index 93e6119473..a120bc6cc3 100644
--- a/tensorflow/contrib/learn/python/learn/estimators/tensor_signature.py
+++ b/tensorflow/contrib/learn/python/learn/estimators/tensor_signature.py
@@ -31,7 +31,7 @@ from tensorflow.python.ops import parsing_ops
class TensorSignature(collections.namedtuple(
"TensorSignature", ["dtype", "shape", "is_sparse"])):
- """Signature of the `Output` object.
+ """Signature of the `Tensor` object.
Useful to check compatibility of tensors.
@@ -104,7 +104,7 @@ def tensors_compatible(tensors, signatures):
"""Check that tensors are compatible with signatures.
Args:
- tensors: Dict of `Output` objects or single `Output` object.
+ tensors: Dict of `Tensor` objects or single `Tensor` object.
signatures: Dict of `TensorSignature` objects or
single `TensorSignature` object.
@@ -135,7 +135,7 @@ def create_signatures(tensors):
"""Creates TensorSignature objects for given tensors.
Args:
- tensors: Dict of `Output` objects or single `Output`.
+ tensors: Dict of `Tensor` objects or single `Tensor`.
Returns:
Dict of `TensorSignature` objects or single `TensorSignature`.
@@ -173,11 +173,11 @@ def create_example_parser_from_signatures(signatures, examples_batch,
Args:
signatures: Dict of `TensorSignature` objects or single `TensorSignature`.
- examples_batch: string `Output` of serialized `Example` proto.
+ examples_batch: string `Tensor` of serialized `Example` proto.
single_feature_name: string, single feature name.
Returns:
- features: `Output` or `dict` of `Output` objects.
+ features: `Tensor` or `dict` of `Tensor` objects.
"""
feature_spec = {}
if not isinstance(signatures, dict):
diff --git a/tensorflow/contrib/learn/python/learn/evaluable.py b/tensorflow/contrib/learn/python/learn/evaluable.py
index 9bd803ea35..051d132416 100644
--- a/tensorflow/contrib/learn/python/learn/evaluable.py
+++ b/tensorflow/contrib/learn/python/learn/evaluable.py
@@ -56,8 +56,8 @@ class Evaluable(object):
be integers representing the class index (i.e. values from 0 to
n_classes-1).
input_fn: Input function returning a tuple of:
- features - Dictionary of string feature name to `Output` or `Output`.
- labels - `Output` or dictionary of `Output` with labels.
+ features - Dictionary of string feature name to `Tensor` or `Tensor`.
+ labels - `Tensor` or dictionary of `Tensor` with labels.
If input_fn is set, `x`, `y`, and `batch_size` must be `None`. If
`steps` is not provided, this should raise `OutOfRangeError` or
`StopIteration` after the desired amount of data (e.g., one epoch) has
diff --git a/tensorflow/contrib/learn/python/learn/graph_actions.py b/tensorflow/contrib/learn/python/learn/graph_actions.py
index 4190dd16ff..5781d88bb8 100644
--- a/tensorflow/contrib/learn/python/learn/graph_actions.py
+++ b/tensorflow/contrib/learn/python/learn/graph_actions.py
@@ -161,7 +161,7 @@ def _monitored_train(graph,
one is extracted from the graph using the same logic as in `Supervisor`.
init_op: An op that initializes the graph. If `None`, use `Supervisor`'s
default.
- init_feed_dict: A dictionary that maps `Output` objects to feed values.
+ init_feed_dict: A dictionary that maps `Tensor` objects to feed values.
This feed dictionary will be used when `init_op` is evaluated.
init_fn: Optional callable passed to Supervisor to initialize the model.
log_every_steps: Output logs regularly. The logs contain timing data and the
@@ -348,7 +348,7 @@ def train(graph,
one is extracted from the graph using the same logic as in `Supervisor`.
init_op: An op that initializes the graph. If `None`, use `Supervisor`'s
default.
- init_feed_dict: A dictionary that maps `Output` objects to feed values.
+ init_feed_dict: A dictionary that maps `Tensor` objects to feed values.
This feed dictionary will be used when `init_op` is evaluated.
init_fn: Optional callable passed to Supervisor to initialize the model.
log_every_steps: Output logs regularly. The logs contain timing data and the
@@ -662,7 +662,7 @@ def evaluate(graph,
"""Evaluate a model loaded from a checkpoint.
Given `graph`, a directory to write summaries to (`output_dir`), a checkpoint
- to restore variables from, and a `dict` of `Output`s to evaluate, run an eval
+ to restore variables from, and a `dict` of `Tensor`s to evaluate, run an eval
loop for `max_steps` steps, or until an exception (generally, an
end-of-input signal from a reader operation) is raised from running
`eval_dict`.
@@ -683,7 +683,7 @@ def evaluate(graph,
returned. If `update_op` is None, then it's evaluated in every step. If
`max_steps` is `None`, this should depend on a reader that will raise an
end-of-input exception when the inputs are exhausted.
- update_op: An `Output` which is run in every step.
+ update_op: A `Tensor` which is run in every step.
global_step_tensor: A `Variable` containing the global step. If `None`,
one is extracted from the graph using the same logic as in `Supervisor`.
Used to place eval summaries on training curves.
@@ -828,7 +828,7 @@ def run_feeds_iter(output_dict, feed_dicts, restore_checkpoint_path=None):
init all variables.
Args:
- output_dict: A `dict` mapping string names to `Output` objects to run.
+ output_dict: A `dict` mapping string names to `Tensor` objects to run.
Tensors must all be from the same graph.
feed_dicts: Iterable of `dict` objects of input values to feed.
restore_checkpoint_path: A string containing the path to a checkpoint to
@@ -837,7 +837,7 @@ def run_feeds_iter(output_dict, feed_dicts, restore_checkpoint_path=None):
Yields:
A sequence of dicts of values read from `output_dict` tensors, one item
yielded for each item in `feed_dicts`. Keys are the same as `output_dict`,
- values are the results read from the corresponding `Output` in
+ values are the results read from the corresponding `Tensor` in
`output_dict`.
Raises:
@@ -886,13 +886,13 @@ def infer(restore_checkpoint_path, output_dict, feed_dict=None):
Args:
restore_checkpoint_path: A string containing the path to a checkpoint to
restore.
- output_dict: A `dict` mapping string names to `Output` objects to run.
+ output_dict: A `dict` mapping string names to `Tensor` objects to run.
Tensors must all be from the same graph.
- feed_dict: `dict` object mapping `Output` objects to input values to feed.
+ feed_dict: `dict` object mapping `Tensor` objects to input values to feed.
Returns:
Dict of values read from `output_dict` tensors. Keys are the same as
- `output_dict`, values are the results read from the corresponding `Output`
+ `output_dict`, values are the results read from the corresponding `Tensor`
in `output_dict`.
Raises:
diff --git a/tensorflow/contrib/learn/python/learn/graph_actions_test.py b/tensorflow/contrib/learn/python/learn/graph_actions_test.py
index 177f15ea5a..caacb1928a 100644
--- a/tensorflow/contrib/learn/python/learn/graph_actions_test.py
+++ b/tensorflow/contrib/learn/python/learn/graph_actions_test.py
@@ -148,7 +148,7 @@ class GraphActionsTest(tf.test.TestCase):
This includes a regular variable, local variable, and fake table.
Returns:
- Tuple of 3 `Output` objects, 2 input and 1 output.
+ Tuple of 3 `Tensor` objects, 2 input and 1 output.
"""
tf.contrib.framework.create_global_step()
in0 = tf.Variable(1.0)
@@ -567,7 +567,7 @@ class GraphActionsTrainTest(tf.test.TestCase):
This includes a regular variable, local variable, and fake table.
Returns:
- Tuple of 3 `Output` objects, 2 input and 1 output.
+ Tuple of 3 `Tensor` objects, 2 input and 1 output.
"""
tf.contrib.framework.create_global_step()
in0 = tf.Variable(1.0)
diff --git a/tensorflow/contrib/learn/python/learn/learn_io/graph_io.py b/tensorflow/contrib/learn/python/learn/learn_io/graph_io.py
index c9e761b3b7..37268c319c 100644
--- a/tensorflow/contrib/learn/python/learn/learn_io/graph_io.py
+++ b/tensorflow/contrib/learn/python/learn/learn_io/graph_io.py
@@ -78,7 +78,7 @@ def read_batch_examples(file_pattern, batch_size, reader,
Args:
file_pattern: List of files or pattern of file paths containing
`Example` records. See `tf.gfile.Glob` for pattern rules.
- batch_size: An int or scalar `Output` specifying the batch size to use.
+ batch_size: An int or scalar `Tensor` specifying the batch size to use.
reader: A function or class that returns an object with
`read` method, (filename tensor) -> (example tensor).
randomize_input: Whether the input should be randomized.
@@ -88,14 +88,14 @@ def read_batch_examples(file_pattern, batch_size, reader,
`tf.global_variables_initializer()` as shown in the tests.
queue_capacity: Capacity for input queue.
num_threads: The number of threads enqueuing examples.
- read_batch_size: An int or scalar `Output` specifying the number of
+ read_batch_size: An int or scalar `Tensor` specifying the number of
records to read at once
parse_fn: Parsing function, takes `Example` Tensor returns parsed
representation. If `None`, no parsing is done.
name: Name of resulting op.
Returns:
- String `Output` of batched `Example` proto.
+ String `Tensor` of batched `Example` proto.
Raises:
ValueError: for invalid inputs.
@@ -130,7 +130,7 @@ def read_keyed_batch_examples(
Args:
file_pattern: List of files or pattern of file paths containing
`Example` records. See `tf.gfile.Glob` for pattern rules.
- batch_size: An int or scalar `Output` specifying the batch size to use.
+ batch_size: An int or scalar `Tensor` specifying the batch size to use.
reader: A function or class that returns an object with
`read` method, (filename tensor) -> (example tensor).
randomize_input: Whether the input should be randomized.
@@ -140,7 +140,7 @@ def read_keyed_batch_examples(
`tf.global_variables_initializer()` as shown in the tests.
queue_capacity: Capacity for input queue.
num_threads: The number of threads enqueuing examples.
- read_batch_size: An int or scalar `Output` specifying the number of
+ read_batch_size: An int or scalar `Tensor` specifying the number of
records to read at once
parse_fn: Parsing function, takes `Example` Tensor returns parsed
representation. If `None`, no parsing is done.
@@ -148,8 +148,8 @@ def read_keyed_batch_examples(
Returns:
Returns tuple of:
- - `Output` of string keys.
- - String `Output` of batched `Example` proto.
+ - `Tensor` of string keys.
+ - String `Tensor` of batched `Example` proto.
Raises:
ValueError: for invalid inputs.
@@ -199,7 +199,7 @@ def _read_keyed_batch_examples_shared_queue(file_pattern,
Args:
file_pattern: List of files or pattern of file paths containing
`Example` records. See `tf.gfile.Glob` for pattern rules.
- batch_size: An int or scalar `Output` specifying the batch size to use.
+ batch_size: An int or scalar `Tensor` specifying the batch size to use.
reader: A function or class that returns an object with
`read` method, (filename tensor) -> (example tensor).
randomize_input: Whether the input should be randomized.
@@ -209,7 +209,7 @@ def _read_keyed_batch_examples_shared_queue(file_pattern,
`tf.global_variables_initializer()` as shown in the tests.
queue_capacity: Capacity for input queue.
num_threads: The number of threads enqueuing examples.
- read_batch_size: An int or scalar `Output` specifying the number of
+ read_batch_size: An int or scalar `Tensor` specifying the number of
records to read at once
parse_fn: Parsing function, takes `Example` Tensor returns parsed
representation. If `None`, no parsing is done.
@@ -217,8 +217,8 @@ def _read_keyed_batch_examples_shared_queue(file_pattern,
Returns:
Returns tuple of:
- - `Output` of string keys.
- - String `Output` of batched `Example` proto.
+ - `Tensor` of string keys.
+ - String `Tensor` of batched `Example` proto.
Raises:
ValueError: for invalid inputs.
@@ -323,7 +323,7 @@ def _read_keyed_batch_examples_helper(file_pattern,
Args:
file_pattern: List of files or pattern of file paths containing
`Example` records. See `tf.gfile.Glob` for pattern rules.
- batch_size: An int or scalar `Output` specifying the batch size to use.
+ batch_size: An int or scalar `Tensor` specifying the batch size to use.
reader: A function or class that returns an object with
`read` method, (filename tensor) -> (example tensor).
randomize_input: Whether the input should be randomized.
@@ -333,7 +333,7 @@ def _read_keyed_batch_examples_helper(file_pattern,
`tf.global_variables_initializer()` as shown in the tests.
queue_capacity: Capacity for input queue.
num_threads: The number of threads enqueuing examples.
- read_batch_size: An int or scalar `Output` specifying the number of
+ read_batch_size: An int or scalar `Tensor` specifying the number of
records to read at once
parse_fn: Parsing function, takes `Example` Tensor returns parsed
representation. If `None`, no parsing is done.
@@ -342,8 +342,8 @@ def _read_keyed_batch_examples_helper(file_pattern,
Returns:
Returns tuple of:
- - `Output` of string keys.
- - String `Output` of batched `Example` proto.
+ - `Tensor` of string keys.
+ - String `Tensor` of batched `Example` proto.
Raises:
ValueError: for invalid inputs.
@@ -447,7 +447,7 @@ def read_keyed_batch_features(file_pattern,
Args:
file_pattern: List of files or pattern of file paths containing
`Example` records. See `tf.gfile.Glob` for pattern rules.
- batch_size: An int or scalar `Output` specifying the batch size to use.
+ batch_size: An int or scalar `Tensor` specifying the batch size to use.
features: A `dict` mapping feature keys to `FixedLenFeature` or
`VarLenFeature` values.
reader: A function or class that returns an object with
@@ -477,8 +477,8 @@ def read_keyed_batch_features(file_pattern,
Returns:
Returns tuple of:
- - `Output` of string keys.
- - A dict of `Output` or `SparseTensor` objects for each in `features`.
+ - `Tensor` of string keys.
+ - A dict of `Tensor` or `SparseTensor` objects for each in `features`.
Raises:
ValueError: for invalid inputs.
@@ -532,7 +532,7 @@ def _read_keyed_batch_features_shared_queue(file_pattern,
Args:
file_pattern: List of files or pattern of file paths containing
`Example` records. See `tf.gfile.Glob` for pattern rules.
- batch_size: An int or scalar `Output` specifying the batch size to use.
+ batch_size: An int or scalar `Tensor` specifying the batch size to use.
features: A `dict` mapping feature keys to `FixedLenFeature` or
`VarLenFeature` values.
reader: A function or class that returns an object with
@@ -555,8 +555,8 @@ def _read_keyed_batch_features_shared_queue(file_pattern,
Returns:
Returns tuple of:
- - `Output` of string keys.
- - A dict of `Output` or `SparseTensor` objects for each in `features`.
+ - `Tensor` of string keys.
+ - A dict of `Tensor` or `SparseTensor` objects for each in `features`.
Raises:
ValueError: for invalid inputs.
@@ -604,8 +604,8 @@ def queue_parsed_features(parsed_features,
All ops are added to the default graph.
Args:
- parsed_features: A dict of string key to `Output` or `SparseTensor` objects.
- keys: `Output` of string keys.
+ parsed_features: A dict of string key to `Tensor` or `SparseTensor` objects.
+ keys: `Tensor` of string keys.
feature_queue_capacity: Capacity of the parsed features queue.
num_queue_runners: Deprecated. Defaults to 2 if this and
`num_enqueue_threads` are both `None`. This is the number of queue
@@ -622,8 +622,8 @@ def queue_parsed_features(parsed_features,
Returns:
Returns tuple of:
- - `Output` corresponding to `keys` if provided, otherwise `None`.
- - A dict of string key to `Output` or `SparseTensor` objects corresponding
+ - `Tensor` corresponding to `keys` if provided, otherwise `None`.
+ - A dict of string key to `Tensor` or `SparseTensor` objects corresponding
to `parsed_features`.
Raises:
ValueError: for invalid inputs.
@@ -748,7 +748,7 @@ def read_batch_features(file_pattern,
Args:
file_pattern: List of files or pattern of file paths containing
`Example` records. See `tf.gfile.Glob` for pattern rules.
- batch_size: An int or scalar `Output` specifying the batch size to use.
+ batch_size: An int or scalar `Tensor` specifying the batch size to use.
features: A `dict` mapping feature keys to `FixedLenFeature` or
`VarLenFeature` values.
reader: A function or class that returns an object with
@@ -767,7 +767,7 @@ def read_batch_features(file_pattern,
name: Name of resulting op.
Returns:
- A dict of `Output` or `SparseTensor` objects for each in `features`.
+ A dict of `Tensor` or `SparseTensor` objects for each in `features`.
Raises:
ValueError: for invalid inputs.
@@ -793,7 +793,7 @@ def read_batch_record_features(file_pattern, batch_size, features,
Args:
file_pattern: List of files or pattern of file paths containing
`Example` records. See `tf.gfile.Glob` for pattern rules.
- batch_size: An int or scalar `Output` specifying the batch size to use.
+ batch_size: An int or scalar `Tensor` specifying the batch size to use.
features: A `dict` mapping feature keys to `FixedLenFeature` or
`VarLenFeature` values.
randomize_input: Whether the input should be randomized.
@@ -806,7 +806,7 @@ def read_batch_record_features(file_pattern, batch_size, features,
name: Name of resulting op.
Returns:
- A dict of `Output` or `SparseTensor` objects for each in `features`.
+ A dict of `Tensor` or `SparseTensor` objects for each in `features`.
Raises:
ValueError: for invalid inputs.
diff --git a/tensorflow/contrib/learn/python/learn/metric_spec.py b/tensorflow/contrib/learn/python/learn/metric_spec.py
index ba9ede3324..a4df7ba658 100644
--- a/tensorflow/contrib/learn/python/learn/metric_spec.py
+++ b/tensorflow/contrib/learn/python/learn/metric_spec.py
@@ -181,7 +181,7 @@ class MetricSpec(object):
The result of calling `metric_fn`.
Raises:
- ValueError: If `predictions` or `labels` is a single `Output` and
+ ValueError: If `predictions` or `labels` is a single `Tensor` and
`self.prediction_key` or `self.label_key` is not `None`; or if
`self.label_key` is `None` but `labels` is a dict with more than one
element, or if `self.prediction_key` is `None but `predictions` is a
diff --git a/tensorflow/contrib/learn/python/learn/monitors.py b/tensorflow/contrib/learn/python/learn/monitors.py
index f5399cec2c..9c70cc8dea 100644
--- a/tensorflow/contrib/learn/python/learn/monitors.py
+++ b/tensorflow/contrib/learn/python/learn/monitors.py
@@ -218,7 +218,7 @@ class BaseMonitor(object):
step: `int`, the current value of the global step.
Returns:
- List of `Output` objects or string tensor names to be run.
+ List of `Tensor` objects or string tensor names to be run.
Raises:
ValueError: if we've already begun a step, or `step` < 0, or
@@ -557,7 +557,7 @@ class SummarySaver(EveryN):
"""Initializes a `SummarySaver` monitor.
Args:
- summary_op: `Output` of type `string`. A serialized `Summary` protocol
+ summary_op: `Tensor` of type `string`. A serialized `Summary` protocol
buffer, as output by TF summary methods like `summary.scalar` or
`summary.merge_all`.
save_steps: `int`, save summaries every N steps. See `EveryN`.
@@ -783,7 +783,7 @@ def get_default_monitors(loss_op=None, summary_op=None, save_summary_steps=100,
"""Returns a default set of typically-used monitors.
Args:
- loss_op: `Output`, the loss tensor. This will be printed using `PrintTensor`
+ loss_op: `Tensor`, the loss tensor. This will be printed using `PrintTensor`
at the default interval.
summary_op: See `SummarySaver`.
save_summary_steps: See `SummarySaver`.
@@ -919,18 +919,18 @@ class ExportMonitor(EveryN):
every_n_steps: Run monitor every N steps.
export_dir: str, folder to export.
input_fn: A function that takes no argument and returns a tuple of
- (features, labels), where features is a dict of string key to `Output`
- and labels is an `Output` that's currently not used (and so can be
+ (features, labels), where features is a dict of string key to `Tensor`
+ and labels is a `Tensor` that's currently not used (and so can be
`None`).
input_feature_key: String key into the features dict returned by
- `input_fn` that corresponds to the raw `Example` strings `Output` that
+ `input_fn` that corresponds to the raw `Example` strings `Tensor` that
the exported model will take as input. Can only be `None` if you're
using a custom `signature_fn` that does not use the first arg
(examples).
exports_to_keep: int, number of exports to keep.
signature_fn: Function that returns a default signature and a named
- signature map, given `Output` of `Example` strings, `dict` of `Output`s
- for features and `dict` of `Output`s for predictions.
+ signature map, given `Tensor` of `Example` strings, `dict` of `Tensor`s
+ for features and `dict` of `Tensor`s for predictions.
default_batch_size: Default batch size of the `Example` placeholder.
Raises:
@@ -1147,7 +1147,7 @@ class NanLoss(EveryN):
"""Initializes NanLoss monitor.
Args:
- loss_tensor: `Output`, the loss tensor.
+ loss_tensor: `Tensor`, the loss tensor.
every_n_steps: `int`, run check every this many steps.
fail_on_nan_loss: `bool`, whether to raise exception when loss is NaN.
"""
diff --git a/tensorflow/contrib/learn/python/learn/ops/losses_ops.py b/tensorflow/contrib/learn/python/learn/ops/losses_ops.py
index d816a9481b..083281c1d9 100644
--- a/tensorflow/contrib/learn/python/learn/ops/losses_ops.py
+++ b/tensorflow/contrib/learn/python/learn/ops/losses_ops.py
@@ -66,7 +66,7 @@ def softmax_classifier(tensor_in,
name: Operation name.
Returns:
- `tuple` of softmax predictions and loss `Output`s.
+ `tuple` of softmax predictions and loss `Tensor`s.
"""
with ops.name_scope(name, 'softmax_classifier', [tensor_in, labels]):
logits = nn.xw_plus_b(tensor_in, weights, biases)
diff --git a/tensorflow/contrib/learn/python/learn/trainable.py b/tensorflow/contrib/learn/python/learn/trainable.py
index fe4a7797d7..8a1548738e 100644
--- a/tensorflow/contrib/learn/python/learn/trainable.py
+++ b/tensorflow/contrib/learn/python/learn/trainable.py
@@ -43,8 +43,8 @@ class Trainable(object):
be integers representing the class index (i.e. values from 0 to
n_classes-1).
input_fn: Input function returning a tuple of:
- features - Dictionary of string feature name to `Output` or `Output`.
- labels - `Output` or dictionary of `Output` with labels.
+ features - Dictionary of string feature name to `Tensor` or `Tensor`.
+ labels - `Tensor` or dictionary of `Tensor` with labels.
If input_fn is set, `x`, `y`, and `batch_size` must be `None`.
steps: Number of steps for which to train model. If `None`, train forever.
'steps' works incrementally. If you call two times fit(steps=10) then
diff --git a/tensorflow/contrib/learn/python/learn/utils/export.py b/tensorflow/contrib/learn/python/learn/utils/export.py
index 8139151db5..fe2f8320f2 100644
--- a/tensorflow/contrib/learn/python/learn/utils/export.py
+++ b/tensorflow/contrib/learn/python/learn/utils/export.py
@@ -89,9 +89,9 @@ def generic_signature_fn(examples, unused_features, predictions):
export_estimator.
Args:
- examples: `Output`.
- unused_features: `dict` of `Output`s.
- predictions: `Output` or `dict` of `Output`s.
+ examples: `Tensor`.
+ unused_features: `dict` of `Tensor`s.
+ predictions: `Tensor` or `dict` of `Tensor`s.
Returns:
Tuple of default signature and empty named signatures.
@@ -114,10 +114,10 @@ def classification_signature_fn(examples, unused_features, predictions):
"""Creates classification signature from given examples and predictions.
Args:
- examples: `Output`.
- unused_features: `dict` of `Output`s.
- predictions: `Output` or dict of tensors that contains the classes tensor
- as in {'classes': `Output`}.
+ examples: `Tensor`.
+ unused_features: `dict` of `Tensor`s.
+ predictions: `Tensor` or dict of tensors that contains the classes tensor
+ as in {'classes': `Tensor`}.
Returns:
Tuple of default classification signature and empty named signatures.
@@ -142,10 +142,10 @@ def classification_signature_fn_with_prob(
"""Classification signature from given examples and predicted probabilities.
Args:
- examples: `Output`.
- unused_features: `dict` of `Output`s.
- predictions: `Output` of predicted probabilities or dict that contains the
- probabilities tensor as in {'probabilities', `Output`}.
+ examples: `Tensor`.
+ unused_features: `dict` of `Tensor`s.
+ predictions: `Tensor` of predicted probabilities or dict that contains the
+ probabilities tensor as in {'probabilities', `Tensor`}.
Returns:
Tuple of default classification signature and empty named signatures.
@@ -169,9 +169,9 @@ def regression_signature_fn(examples, unused_features, predictions):
"""Creates regression signature from given examples and predictions.
Args:
- examples: `Output`.
- unused_features: `dict` of `Output`s.
- predictions: `Output`.
+ examples: `Tensor`.
+ unused_features: `dict` of `Tensor`s.
+ predictions: `Tensor`.
Returns:
Tuple of default regression signature and empty named signatures.
@@ -191,11 +191,11 @@ def logistic_regression_signature_fn(examples, unused_features, predictions):
"""Creates logistic regression signature from given examples and predictions.
Args:
- examples: `Output`.
- unused_features: `dict` of `Output`s.
- predictions: `Output` of shape [batch_size, 2] of predicted probabilities or
+ examples: `Tensor`.
+ unused_features: `dict` of `Tensor`s.
+ predictions: `Tensor` of shape [batch_size, 2] of predicted probabilities or
dict that contains the probabilities tensor as in
- {'probabilities', `Output`}.
+ {'probabilities', `Tensor`}.
Returns:
Tuple of default regression signature and named signature.
diff --git a/tensorflow/contrib/linear_optimizer/python/sdca_optimizer.py b/tensorflow/contrib/linear_optimizer/python/sdca_optimizer.py
index b6e59b02b6..6ff4bf3175 100644
--- a/tensorflow/contrib/linear_optimizer/python/sdca_optimizer.py
+++ b/tensorflow/contrib/linear_optimizer/python/sdca_optimizer.py
@@ -46,7 +46,7 @@ class SDCAOptimizer(object):
Here the expectation is that the input_fn_* functions passed to train and
evaluate return a pair (dict, label_tensor) where dict has `example_id_column`
- as `key` whose value is an `Output` of shape [batch_size] and dtype string.
+ as `key` whose value is a `Tensor` of shape [batch_size] and dtype string.
num_loss_partitions defines the number of partitions of the global loss
function and should be set to (#concurrent train ops/per worker) x (#workers).
Convergence of (global) loss is guaranteed if num_loss_partitions is larger or
diff --git a/tensorflow/contrib/lookup/lookup_ops.py b/tensorflow/contrib/lookup/lookup_ops.py
index 9161a414d0..d4f9c92b2d 100644
--- a/tensorflow/contrib/lookup/lookup_ops.py
+++ b/tensorflow/contrib/lookup/lookup_ops.py
@@ -153,11 +153,11 @@ class InitializableLookupTableBase(LookupInterface):
The `default_value` is used for keys not present in the table.
Args:
- keys: Keys to look up. May be either a `SparseTensor` or dense `Output`.
+ keys: Keys to look up. May be either a `SparseTensor` or dense `Tensor`.
name: A name for the operation (optional).
Returns:
- A `SparseTensor` if keys are sparse, otherwise a dense `Output`.
+ A `SparseTensor` if keys are sparse, otherwise a dense `Tensor`.
Raises:
TypeError: when `keys` or `default_value` doesn't match the table data
@@ -391,7 +391,7 @@ class TextFileInitializer(TableInitializerBase):
Args:
filename: The filename of the text file to be used for initialization.
The path must be accessible from wherever the graph is initialized
- (eg. trainer or eval workers). The filename may be a scalar `Output`.
+ (eg. trainer or eval workers). The filename may be a scalar `Tensor`.
key_dtype: The `key` data type.
key_index: the index that represents information of a line to get the
table 'key' values from.
@@ -503,7 +503,7 @@ class TextFileStringTableInitializer(TextFileInitializer):
Args:
filename: The filename of the text file to be used for initialization.
The path must be accessible from wherever the graph is initialized
- (eg. trainer or eval workers). The filename may be a scalar `Output`.
+ (eg. trainer or eval workers). The filename may be a scalar `Tensor`.
key_column_index: The column index from the text file to get the keys
from. The default is 0 that represents the whole line content.
value_column_index: The column index from the text file to get the
@@ -553,7 +553,7 @@ class TextFileIdTableInitializer(TextFileInitializer):
Args:
filename: The filename of the text file to be used for initialization.
The path must be accessible from wherever the graph is initialized
- (eg. trainer or eval workers). The filename may be a scalar `Output`.
+ (eg. trainer or eval workers). The filename may be a scalar `Tensor`.
key_column_index: The column index from the text file to get the `key`
values from. The default is to use the line number, starting from zero.
value_column_index: The column index from the text file ro get the `value`
@@ -606,8 +606,8 @@ def string_to_index(tensor, mapping, default_value=-1, name=None):
```
Args:
- tensor: A 1-D input `Output` with the strings to map to indices.
- mapping: A 1-D string `Output` that specifies the mapping of strings to
+ tensor: A 1-D input `Tensor` with the strings to map to indices.
+ mapping: A 1-D string `Tensor` that specifies the mapping of strings to
indices.
default_value: The `int64` value to use for out-of-vocabulary strings.
Defaults to -1.
@@ -662,8 +662,8 @@ def index_to_string(tensor, mapping, default_value="UNK", name=None):
```
Args:
- tensor: A `int64` `Output` with the indices to map to strings.
- mapping: A 1-D string `Output` that specifies the strings to map from
+ tensor: A `int64` `Tensor` with the indices to map to strings.
+ mapping: A 1-D string `Tensor` that specifies the strings to map from
indices.
default_value: The string value to use for out-of-vocabulary indices.
name: A name for this op (optional).
diff --git a/tensorflow/contrib/losses/python/losses/loss_ops.py b/tensorflow/contrib/losses/python/losses/loss_ops.py
index a3fd7cd7ca..7610f9275f 100644
--- a/tensorflow/contrib/losses/python/losses/loss_ops.py
+++ b/tensorflow/contrib/losses/python/losses/loss_ops.py
@@ -79,8 +79,8 @@ def _scale_losses(losses, weights):
"""Computes the scaled loss.
Args:
- losses: An `Output` of size [batch_size, d1, ... dN].
- weights: An `Output` of size [1], [batch_size] or [batch_size, d1, ... dN].
+ losses: A `Tensor` of size [batch_size, d1, ... dN].
+ weights: A `Tensor` of size [1], [batch_size] or [batch_size, d1, ... dN].
The `losses` are reduced (tf.reduce_sum) until its dimension matches
that of `weights` at which point the reduced `losses` are element-wise
multiplied by `weights` and a final reduce_sum is computed on the result.
@@ -89,7 +89,7 @@ def _scale_losses(losses, weights):
multiplication, and summing the result.
Returns:
- A scalar tf.float32 `Output` whose value represents the sum of the scaled
+ A scalar tf.float32 `Tensor` whose value represents the sum of the scaled
`losses`.
"""
# First, compute the sum of the losses over all elements:
@@ -109,9 +109,9 @@ def _safe_div(numerator, denominator, name="value"):
creep into the gradient computation.
Args:
- numerator: An arbitrary `Output`.
- denominator: An `Output` whose shape matches `numerator` and whose values
- are assumed to be non-negative.
+ numerator: An arbitrary `Tensor`.
+ denominator: A `Tensor` whose shape matches `numerator` and whose values are
+ assumed to be non-negative.
name: An optional name for the returned op.
Returns:
@@ -153,7 +153,7 @@ def compute_weighted_loss(
weight: Deprecated alias for `weights`.
Returns:
- A scalar `Output` that returns the weighted loss.
+ A scalar `Tensor` that returns the weighted loss.
Raises:
ValueError: If `weights` is `None` or the shape is not compatible with
@@ -238,7 +238,7 @@ def add_loss(loss, loss_collection=ops.GraphKeys.LOSSES):
"""Adds a externally defined loss to the collection of losses.
Args:
- loss: A loss `Output`.
+ loss: A loss `Tensor`.
loss_collection: Optional collection to add the loss to.
"""
if loss_collection:
@@ -281,7 +281,7 @@ def get_total_loss(add_regularization_losses=True, name="total_loss"):
name: The name of the returned tensor.
Returns:
- An `Output` whose value represents the total loss.
+ A `Tensor` whose value represents the total loss.
Raises:
ValueError: if `losses` is not iterable.
@@ -320,7 +320,7 @@ def absolute_difference(
weight: Deprecated alias for `weights`.
Returns:
- A scalar `Output` representing the loss value.
+ A scalar `Tensor` representing the loss value.
Raises:
ValueError: If the shape of `predictions` doesn't match that of `labels` or
@@ -364,7 +364,7 @@ def sigmoid_cross_entropy(
weight: Deprecated alias for `weights`.
Returns:
- A scalar `Output` representing the loss value.
+ A scalar `Tensor` representing the loss value.
Raises:
ValueError: If the shape of `logits` doesn't match that of
@@ -413,7 +413,7 @@ def softmax_cross_entropy(
weight: Deprecated alias for `weights`.
Returns:
- A scalar `Output` representing the loss value.
+ A scalar `Tensor` representing the loss value.
Raises:
ValueError: If the shape of `logits` doesn't match that of `onehot_labels`
@@ -460,7 +460,7 @@ def sparse_softmax_cross_entropy(
weight: Deprecated alias for `weights`.
Returns:
- A scalar `Output` representing the loss value.
+ A scalar `Tensor` representing the loss value.
Raises:
ValueError: If the shapes of logits, labels, and weight are incompatible, or
@@ -506,7 +506,7 @@ def log_loss(
weight: Deprecated alias for `weights`.
Returns:
- A scalar `Output` representing the loss value.
+ A scalar `Tensor` representing the loss value.
Raises:
ValueError: If the shape of `predictions` doesn't match that of `labels` or
@@ -539,7 +539,7 @@ def hinge_loss(logits, labels=None, scope=None, target=None):
target: Deprecated alias for `labels`.
Returns:
- An `Output` of same shape as logits and target representing the loss values
+ A `Tensor` of same shape as logits and target representing the loss values
across the batch.
Raises:
@@ -583,7 +583,7 @@ def mean_squared_error(
weight: Deprecated alias for `weights`.
Returns:
- A scalar `Output` representing the loss value.
+ A scalar `Tensor` representing the loss value.
Raises:
ValueError: If the shape of `predictions` doesn't match that of `labels` or
@@ -642,7 +642,7 @@ def mean_pairwise_squared_error(
weight: Deprecated alias for `weights`.
Returns:
- A scalar `Output` representing the loss value.
+ A scalar `Tensor` representing the loss value.
Raises:
ValueError: If the shape of `predictions` doesn't match that of `labels` or
@@ -704,7 +704,7 @@ def cosine_distance(
Args:
predictions: An arbitrary matrix.
- labels: An `Output` whose shape matches 'predictions'
+ labels: A `Tensor` whose shape matches 'predictions'
dim: The dimension along which the cosine distance is computed.
weights: Coefficients for the loss a scalar, a tensor of shape
[batch_size] or a tensor whose shape matches `predictions`.
@@ -713,7 +713,7 @@ def cosine_distance(
weight: Deprecated alias for `weights`.
Returns:
- A scalar `Output` representing the loss value.
+ A scalar `Tensor` representing the loss value.
Raises:
ValueError: If `predictions` shape doesn't match `labels` shape, or
diff --git a/tensorflow/contrib/metrics/__init__.py b/tensorflow/contrib/metrics/__init__.py
index 1cf60274bb..8bfa1f97d8 100644
--- a/tensorflow/contrib/metrics/__init__.py
+++ b/tensorflow/contrib/metrics/__init__.py
@@ -17,14 +17,14 @@
### API
This module provides functions for computing streaming metrics: metrics computed
-on dynamically valued `Output`s. Each metric declaration returns a
+on dynamically valued `Tensors`. Each metric declaration returns a
"value_tensor", an idempotent operation that returns the current value of the
metric, and an "update_op", an operation that accumulates the information
-from the current value of the `Output`s being measured as well as returns the
+from the current value of the `Tensors` being measured as well as returns the
value of the "value_tensor".
To use any of these metrics, one need only declare the metric, call `update_op`
-repeatedly to accumulate data over the desired number of `Output` values (often
+repeatedly to accumulate data over the desired number of `Tensor` values (often
each one is a single batch) and finally evaluate the value_tensor. For example,
to use the `streaming_mean`:
diff --git a/tensorflow/contrib/metrics/python/metrics/classification.py b/tensorflow/contrib/metrics/python/metrics/classification.py
index dc7be0ae04..014a0d7886 100644
--- a/tensorflow/contrib/metrics/python/metrics/classification.py
+++ b/tensorflow/contrib/metrics/python/metrics/classification.py
@@ -30,14 +30,14 @@ def accuracy(predictions, labels, weights=None):
"""Computes the percentage of times that predictions matches labels.
Args:
- predictions: the predicted values, an `Output` whose dtype and shape
+ predictions: the predicted values, a `Tensor` whose dtype and shape
matches 'labels'.
- labels: the ground truth values, an `Output` of any shape and
+ labels: the ground truth values, a `Tensor` of any shape and
bool, integer, or string dtype.
- weights: None or `Output` of float values to reweight the accuracy.
+ weights: None or `Tensor` of float values to reweight the accuracy.
Returns:
- Accuracy `Output`.
+ Accuracy `Tensor`.
Raises:
ValueError: if dtypes don't match or
diff --git a/tensorflow/contrib/metrics/python/ops/confusion_matrix_ops.py b/tensorflow/contrib/metrics/python/ops/confusion_matrix_ops.py
index 951a53ad78..dd57f0478b 100644
--- a/tensorflow/contrib/metrics/python/ops/confusion_matrix_ops.py
+++ b/tensorflow/contrib/metrics/python/ops/confusion_matrix_ops.py
@@ -71,7 +71,7 @@ def confusion_matrix(predictions, labels, num_classes=None, dtype=dtypes.int32,
using both predictions and labels array.
dtype: Data type of the confusion matrix.
name: Scope name.
- weights: An optional `Output` whose shape matches `predictions`.
+ weights: An optional `Tensor` whose shape matches `predictions`.
Returns:
A k X k matrix representing the confusion matrix, where k is the number of
diff --git a/tensorflow/contrib/metrics/python/ops/histogram_ops.py b/tensorflow/contrib/metrics/python/ops/histogram_ops.py
index b8be5d5be5..cadace37a0 100644
--- a/tensorflow/contrib/metrics/python/ops/histogram_ops.py
+++ b/tensorflow/contrib/metrics/python/ops/histogram_ops.py
@@ -57,10 +57,10 @@ def auc_using_histogram(boolean_labels,
numbers of bins and comparing results.
Args:
- boolean_labels: 1-D boolean `Output`. Entry is `True` if the corresponding
+ boolean_labels: 1-D boolean `Tensor`. Entry is `True` if the corresponding
record is in class.
- scores: 1-D numeric `Output`, same shape as boolean_labels.
- score_range: `Output` of shape `[2]`, same dtype as `scores`. The min/max
+ scores: 1-D numeric `Tensor`, same shape as boolean_labels.
+ score_range: `Tensor` of shape `[2]`, same dtype as `scores`. The min/max
values of score that we expect. Scores outside range will be clipped.
nbins: Integer number of bins to use. Accuracy strictly increases as the
number of bins increases.
@@ -71,7 +71,7 @@ def auc_using_histogram(boolean_labels,
name: A name for this Op. Defaults to "auc_using_histogram".
Returns:
- auc: `float32` scalar `Output`. Fetching this converts internal histograms
+ auc: `float32` scalar `Tensor`. Fetching this converts internal histograms
to auc value.
update_op: `Op`, when run, updates internal histograms.
"""
@@ -179,14 +179,14 @@ def _auc_convert_hist_to_auc(hist_true_acc, hist_false_acc, nbins):
"""Convert histograms to auc.
Args:
- hist_true_acc: `Output` holding accumulated histogram of scores for records
+ hist_true_acc: `Tensor` holding accumulated histogram of scores for records
that were `True`.
- hist_false_acc: `Output` holding accumulated histogram of scores for
+ hist_false_acc: `Tensor` holding accumulated histogram of scores for
records that were `False`.
nbins: Integer number of bins in the histograms.
Returns:
- Scalar `Output` estimating AUC.
+ Scalar `Tensor` estimating AUC.
"""
# Note that this follows the "Approximating AUC" section in:
# Efficient AUC learning curve calculation, R. R. Bouckaert,
diff --git a/tensorflow/contrib/metrics/python/ops/metric_ops.py b/tensorflow/contrib/metrics/python/ops/metric_ops.py
index e6beae6f87..90b56b6a97 100644
--- a/tensorflow/contrib/metrics/python/ops/metric_ops.py
+++ b/tensorflow/contrib/metrics/python/ops/metric_ops.py
@@ -45,8 +45,8 @@ def _safe_div(numerator, denominator, name):
"""Divides two values, returning 0 if the denominator is <= 0.
Args:
- numerator: A real `Output`.
- denominator: A real `Output`, with dtype matching `numerator`.
+ numerator: A real `Tensor`.
+ denominator: A real `Tensor`, with dtype matching `numerator`.
name: Name for the returned op.
Returns:
@@ -63,8 +63,8 @@ def _safe_scalar_div(numerator, denominator, name):
"""Divides two values, returning 0 if the denominator is 0.
Args:
- numerator: A scalar `float64` `Output`.
- denominator: A scalar `float64` `Output`.
+ numerator: A scalar `float64` `Tensor`.
+ denominator: A scalar `float64` `Tensor`.
name: Name for the returned op.
Returns:
@@ -112,8 +112,8 @@ def _count_condition(values, weights=None, metrics_collections=None,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- values: A `bool` `Output` of arbitrary size.
- weights: An optional `Output` whose shape is broadcastable to `values`.
+ values: A `bool` `Tensor` of arbitrary size.
+ weights: An optional `Tensor` whose shape is broadcastable to `values`.
metrics_collections: An optional list of collections that the metric
value variable should be added to.
updates_collections: An optional list of collections that the metric update
@@ -157,11 +157,11 @@ def _streaming_true_positives(predictions, labels, weights=None,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions: The predicted values, a `bool` `Output` of arbitrary
+ predictions: The predicted values, a `bool` `Tensor` of arbitrary
dimensions.
- labels: The ground truth values, a `bool` `Output` whose dimensions must
+ labels: The ground truth values, a `bool` `Tensor` whose dimensions must
match `predictions`.
- weights: An optional `Output` whose shape is broadcastable to `predictions`.
+ weights: An optional `Tensor` whose shape is broadcastable to `predictions`.
metrics_collections: An optional list of collections that the metric
value variable should be added to.
updates_collections: An optional list of collections that the metric update
@@ -197,11 +197,11 @@ def _streaming_false_positives(predictions, labels, weights=None,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions: The predicted values, a `bool` `Output` of arbitrary
+ predictions: The predicted values, a `bool` `Tensor` of arbitrary
dimensions.
- labels: The ground truth values, a `bool` `Output` whose dimensions must
+ labels: The ground truth values, a `bool` `Tensor` whose dimensions must
match `predictions`.
- weights: An optional `Output` whose shape is broadcastable to `predictions`.
+ weights: An optional `Tensor` whose shape is broadcastable to `predictions`.
metrics_collections: An optional list of collections that the metric
value variable should be added to.
updates_collections: An optional list of collections that the metric update
@@ -237,11 +237,11 @@ def _streaming_false_negatives(predictions, labels, weights=None,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions: The predicted values, a `bool` `Output` of arbitrary
+ predictions: The predicted values, a `bool` `Tensor` of arbitrary
dimensions.
- labels: The ground truth values, a `bool` `Output` whose dimensions must
+ labels: The ground truth values, a `bool` `Tensor` whose dimensions must
match `predictions`.
- weights: An optional `Output` whose shape is broadcastable to `predictions`.
+ weights: An optional `Tensor` whose shape is broadcastable to `predictions`.
metrics_collections: An optional list of collections that the metric
value variable should be added to.
updates_collections: An optional list of collections that the metric update
@@ -276,8 +276,8 @@ def _broadcast_weights(weights, values):
`reduce_sum(w * v) / reduce_sum(_broadcast_weights(w, v))`.
Args:
- weights: `Output` whose shape is broadcastable to `values`.
- values: `Output` of any shape.
+ weights: `Tensor` whose shape is broadcastable to `values`.
+ values: `Tensor` of any shape.
Returns:
`weights` broadcast to `values` shape.
@@ -309,8 +309,8 @@ def streaming_mean(values, weights=None, metrics_collections=None,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- values: An `Output` of arbitrary dimensions.
- weights: An optional `Output` whose shape is broadcastable to `values`.
+ values: A `Tensor` of arbitrary dimensions.
+ weights: An optional `Tensor` whose shape is broadcastable to `values`.
metrics_collections: An optional list of collections that `mean`
should be added to.
updates_collections: An optional list of collections that `update_op`
@@ -378,8 +378,8 @@ def streaming_mean_tensor(values, weights=None, metrics_collections=None,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- values: An `Output` of arbitrary dimensions.
- weights: An optional `Output` whose shape is broadcastable to `values`.
+ values: A `Tensor` of arbitrary dimensions.
+ weights: An optional `Tensor` whose shape is broadcastable to `values`.
metrics_collections: An optional list of collections that `mean`
should be added to.
updates_collections: An optional list of collections that `update_op`
@@ -441,7 +441,7 @@ def streaming_accuracy(predictions, labels, weights=None,
For estimation of the metric over a stream of data, the function creates an
`update_op` operation that updates these variables and returns the `accuracy`.
- Internally, an `is_correct` operation computes an `Output` with elements 1.0
+ Internally, an `is_correct` operation computes a `Tensor` with elements 1.0
where the corresponding elements of `predictions` and `labels` match and 0.0
otherwise. Then `update_op` increments `total` with the reduced sum of the
product of `weights` and `is_correct`, and it increments `count` with the
@@ -450,10 +450,10 @@ def streaming_accuracy(predictions, labels, weights=None,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions: The predicted values, an `Output` of any shape.
- labels: The ground truth values, an `Output` whose shape matches
+ predictions: The predicted values, a `Tensor` of any shape.
+ labels: The ground truth values, a `Tensor` whose shape matches
`predictions`.
- weights: An optional `Output` whose shape is broadcastable to `predictions`.
+ weights: An optional `Tensor` whose shape is broadcastable to `predictions`.
metrics_collections: An optional list of collections that `accuracy` should
be added to.
updates_collections: An optional list of collections that `update_op` should
@@ -501,10 +501,10 @@ def streaming_precision(predictions, labels, weights=None,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions: The predicted values, a `bool` `Output` of arbitrary shape.
- labels: The ground truth values, a `bool` `Output` whose dimensions must
+ predictions: The predicted values, a `bool` `Tensor` of arbitrary shape.
+ labels: The ground truth values, a `bool` `Tensor` whose dimensions must
match `predictions`.
- weights: An optional `Output` whose shape is broadcastable to `predictions`.
+ weights: An optional `Tensor` whose shape is broadcastable to `predictions`.
metrics_collections: An optional list of collections that `precision` should
be added to.
updates_collections: An optional list of collections that `update_op` should
@@ -512,7 +512,7 @@ def streaming_precision(predictions, labels, weights=None,
name: An optional variable_scope name.
Returns:
- precision: Scalar float `Output` with the value of `true_positives`
+ precision: Scalar float `Tensor` with the value of `true_positives`
divided by the sum of `true_positives` and `false_positives`.
update_op: `Operation` that increments `true_positives` and
`false_positives` variables appropriately and whose value matches
@@ -576,10 +576,10 @@ def streaming_recall(predictions, labels, weights=None,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions: The predicted values, a `bool` `Output` of arbitrary shape.
- labels: The ground truth values, a `bool` `Output` whose dimensions must
+ predictions: The predicted values, a `bool` `Tensor` of arbitrary shape.
+ labels: The ground truth values, a `bool` `Tensor` whose dimensions must
match `predictions`.
- weights: An optional `Output` whose shape is broadcastable to `predictions`.
+ weights: An optional `Tensor` whose shape is broadcastable to `predictions`.
metrics_collections: An optional list of collections that `recall` should
be added to.
updates_collections: An optional list of collections that `update_op` should
@@ -587,7 +587,7 @@ def streaming_recall(predictions, labels, weights=None,
name: An optional variable_scope name.
Returns:
- recall: Scalar float `Output` with the value of `true_positives` divided
+ recall: Scalar float `Tensor` with the value of `true_positives` divided
by the sum of `true_positives` and `false_negatives`.
update_op: `Operation` that increments `true_positives` and
`false_negatives` variables appropriately and whose value matches
@@ -653,12 +653,12 @@ def _tp_fn_tn_fp(predictions, labels, thresholds, weights=None):
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions: A floating point `Output` of arbitrary shape and whose values
+ predictions: A floating point `Tensor` of arbitrary shape and whose values
are in the range `[0, 1]`.
- labels: An `Output` whose shape matches `predictions`. `labels` will be cast
+ labels: A `Tensor` whose shape matches `predictions`. `labels` will be cast
to `bool`.
thresholds: A python list or tuple of float thresholds in `[0, 1]`.
- weights: An optional `Output` whose shape is broadcastable to `predictions`.
+ weights: An optional `Tensor` whose shape is broadcastable to `predictions`.
Returns:
true_positive: A variable of shape [len(thresholds)].
@@ -776,10 +776,10 @@ def streaming_auc(predictions, labels, weights=None, num_thresholds=200,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions: A floating point `Output` of arbitrary shape and whose values
+ predictions: A floating point `Tensor` of arbitrary shape and whose values
are in the range `[0, 1]`.
- labels: A `bool` `Output` whose shape matches `predictions`.
- weights: An optional `Output` whose shape is broadcastable to `predictions`.
+ labels: A `bool` `Tensor` whose shape matches `predictions`.
+ weights: An optional `Tensor` whose shape is broadcastable to `predictions`.
num_thresholds: The number of thresholds to use when discretizing the roc
curve.
metrics_collections: An optional list of collections that `auc` should be
@@ -870,11 +870,11 @@ def streaming_specificity_at_sensitivity(
following: https://en.wikipedia.org/wiki/Sensitivity_and_specificity
Args:
- predictions: A floating point `Output` of arbitrary shape and whose values
+ predictions: A floating point `Tensor` of arbitrary shape and whose values
are in the range `[0, 1]`.
- labels: A `bool` `Output` whose shape matches `predictions`.
+ labels: A `bool` `Tensor` whose shape matches `predictions`.
sensitivity: A scalar value in range `[0, 1]`.
- weights: An optional `Output` whose shape is broadcastable to `predictions`.
+ weights: An optional `Tensor` whose shape is broadcastable to `predictions`.
num_thresholds: The number of thresholds to use for matching the given
sensitivity.
metrics_collections: An optional list of collections that `specificity`
@@ -974,11 +974,11 @@ def streaming_sensitivity_at_specificity(
following: https://en.wikipedia.org/wiki/Sensitivity_and_specificity
Args:
- predictions: A floating point `Output` of arbitrary shape and whose values
+ predictions: A floating point `Tensor` of arbitrary shape and whose values
are in the range `[0, 1]`.
- labels: A `bool` `Output` whose shape matches `predictions`.
+ labels: A `bool` `Tensor` whose shape matches `predictions`.
specificity: A scalar value in range `[0, 1]`.
- weights: An optional `Output` whose shape is broadcastable to `predictions`.
+ weights: An optional `Tensor` whose shape is broadcastable to `predictions`.
num_thresholds: The number of thresholds to use for matching the given
specificity.
metrics_collections: An optional list of collections that `sensitivity`
@@ -1059,11 +1059,11 @@ def streaming_precision_at_thresholds(predictions, labels, thresholds,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions: A floating point `Output` of arbitrary shape and whose values
+ predictions: A floating point `Tensor` of arbitrary shape and whose values
are in the range `[0, 1]`.
- labels: A `bool` `Output` whose shape matches `predictions`.
+ labels: A `bool` `Tensor` whose shape matches `predictions`.
thresholds: A python list or tuple of float thresholds in `[0, 1]`.
- weights: An optional `Output` whose shape is broadcastable to `predictions`.
+ weights: An optional `Tensor` whose shape is broadcastable to `predictions`.
metrics_collections: An optional list of collections that `auc` should be
added to.
updates_collections: An optional list of collections that `update_op` should
@@ -1131,11 +1131,11 @@ def streaming_recall_at_thresholds(predictions, labels, thresholds,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions: A floating point `Output` of arbitrary shape and whose values
+ predictions: A floating point `Tensor` of arbitrary shape and whose values
are in the range `[0, 1]`.
- labels: A `bool` `Output` whose shape matches `predictions`.
+ labels: A `bool` `Tensor` whose shape matches `predictions`.
thresholds: A python list or tuple of float thresholds in `[0, 1]`.
- weights: An optional `Output` whose shape is broadcastable to `predictions`.
+ weights: An optional `Tensor` whose shape is broadcastable to `predictions`.
metrics_collections: An optional list of collections that `recall` should be
added to.
updates_collections: An optional list of collections that `update_op` should
@@ -1206,7 +1206,7 @@ def streaming_recall_at_k(predictions, labels, k, weights=None,
For estimation of the metric over a stream of data, the function creates an
`update_op` operation that updates these variables and returns the
- `recall_at_<k>`. Internally, an `in_top_k` operation computes an `Output` with
+ `recall_at_<k>`. Internally, an `in_top_k` operation computes a `Tensor` with
shape [batch_size] whose elements indicate whether or not the corresponding
label is in the top `k` `predictions`. Then `update_op` increments `total`
with the reduced sum of `weights` where `in_top_k` is `True`, and it
@@ -1219,7 +1219,7 @@ def streaming_recall_at_k(predictions, labels, k, weights=None,
labels: A tensor of dimension [batch_size] whose type is in `int32`,
`int64`.
k: The number of top elements to look at for computing recall.
- weights: An optional `Output` whose shape is broadcastable to `predictions`.
+ weights: An optional `Tensor` whose shape is broadcastable to `predictions`.
metrics_collections: An optional list of collections that `recall_at_k`
should be added to.
updates_collections: An optional list of collections `update_op` should be
@@ -1273,7 +1273,7 @@ def streaming_sparse_recall_at_k(predictions,
For estimation of the metric over a stream of data, the function creates an
`update_op` operation that updates these variables and returns the
- `recall_at_<k>`. Internally, a `top_k` operation computes an `Output`
+ `recall_at_<k>`. Internally, a `top_k` operation computes a `Tensor`
indicating the top `k` `predictions`. Set operations applied to `top_k` and
`labels` calculate the true positives and false negatives weighted by
`weights`. Then `update_op` increments `true_positive_at_<k>` and
@@ -1282,11 +1282,11 @@ def streaming_sparse_recall_at_k(predictions,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions: Float `Output` with shape [D1, ... DN, num_classes] where
+ predictions: Float `Tensor` with shape [D1, ... DN, num_classes] where
N >= 1. Commonly, N=1 and predictions has shape [batch size, num_classes].
The final dimension contains the logit values for each class. [D1, ... DN]
must match `labels`.
- labels: `int64` `Output` or `SparseTensor` with shape
+ labels: `int64` `Tensor` or `SparseTensor` with shape
[D1, ... DN, num_labels], where N >= 1 and num_labels is the number of
target classes for the associated prediction. Commonly, N=1 and `labels`
has shape [batch_size, num_labels]. [D1, ... DN] must match `predictions`.
@@ -1297,7 +1297,7 @@ def streaming_sparse_recall_at_k(predictions,
class_id: Integer class ID for which we want binary metrics. This should be
in range [0, num_classes), where num_classes is the last dimension of
`predictions`. If class_id is outside this range, the method returns NAN.
- weights: An optional `Output` whose shape is broadcastable to the the first
+ weights: An optional `Tensor` whose shape is broadcastable to the the first
[D1, ... DN] dimensions of `predictions` and `labels`.
metrics_collections: An optional list of collections that values should
be added to.
@@ -1306,7 +1306,7 @@ def streaming_sparse_recall_at_k(predictions,
name: Name of new update operation, and namespace for other dependent ops.
Returns:
- recall: Scalar `float64` `Output` with the value of `true_positives` divided
+ recall: Scalar `float64` `Tensor` with the value of `true_positives` divided
by the sum of `true_positives` and `false_negatives`.
update_op: `Operation` that increments `true_positives` and
`false_negatives` variables appropriately, and whose value matches
@@ -1352,11 +1352,11 @@ def _streaming_sparse_precision_at_k(top_k_idx,
streaming_sparse_precision_at_top_k. Refer to those methods for more details.
Args:
- top_k_idx: Integer `Output` with shape [D1, ... DN, k] where
+ top_k_idx: Integer `Tensor` with shape [D1, ... DN, k] where
N >= 1. Commonly, N=1 and top_k_idx has shape [batch size, k].
The final dimension contains the indices of top-k labels. [D1, ... DN]
must match `labels`.
- labels: `int64` `Output` or `SparseTensor` with shape
+ labels: `int64` `Tensor` or `SparseTensor` with shape
[D1, ... DN, num_labels], where N >= 1 and num_labels is the number of
target classes for the associated prediction. Commonly, N=1 and `labels`
has shape [batch_size, num_labels]. [D1, ... DN] must match
@@ -1368,7 +1368,7 @@ def _streaming_sparse_precision_at_k(top_k_idx,
in range [0, num_classes), where num_classes is the last dimension of
`predictions`. If `class_id` is outside this range, the method returns
NAN.
- weights: An optional `Output` whose shape is broadcastable to the the first
+ weights: An optional `Tensor` whose shape is broadcastable to the the first
[D1, ... DN] dimensions of `predictions` and `labels`.
metrics_collections: An optional list of collections that values should
be added to.
@@ -1377,7 +1377,7 @@ def _streaming_sparse_precision_at_k(top_k_idx,
name: Name of the metric and of the enclosing scope.
Returns:
- precision: Scalar `float64` `Output` with the value of `true_positives`
+ precision: Scalar `float64` `Tensor` with the value of `true_positives`
divided by the sum of `true_positives` and `false_positives`.
update_op: `Operation` that increments `true_positives` and
`false_positives` variables appropriately, and whose value matches
@@ -1434,7 +1434,7 @@ def streaming_sparse_precision_at_k(predictions,
For estimation of the metric over a stream of data, the function creates an
`update_op` operation that updates these variables and returns the
- `precision_at_<k>`. Internally, a `top_k` operation computes an `Output`
+ `precision_at_<k>`. Internally, a `top_k` operation computes a `Tensor`
indicating the top `k` `predictions`. Set operations applied to `top_k` and
`labels` calculate the true positives and false positives weighted by
`weights`. Then `update_op` increments `true_positive_at_<k>` and
@@ -1443,11 +1443,11 @@ def streaming_sparse_precision_at_k(predictions,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions: Float `Output` with shape [D1, ... DN, num_classes] where
+ predictions: Float `Tensor` with shape [D1, ... DN, num_classes] where
N >= 1. Commonly, N=1 and predictions has shape [batch size, num_classes].
The final dimension contains the logit values for each class. [D1, ... DN]
must match `labels`.
- labels: `int64` `Output` or `SparseTensor` with shape
+ labels: `int64` `Tensor` or `SparseTensor` with shape
[D1, ... DN, num_labels], where N >= 1 and num_labels is the number of
target classes for the associated prediction. Commonly, N=1 and `labels`
has shape [batch_size, num_labels]. [D1, ... DN] must match
@@ -1459,7 +1459,7 @@ def streaming_sparse_precision_at_k(predictions,
in range [0, num_classes], where num_classes is the last dimension of
`predictions`. If `class_id` is outside this range, the method returns
NAN.
- weights: An optional `Output` whose shape is broadcastable to the the first
+ weights: An optional `Tensor` whose shape is broadcastable to the the first
[D1, ... DN] dimensions of `predictions` and `labels`.
metrics_collections: An optional list of collections that values should
be added to.
@@ -1468,7 +1468,7 @@ def streaming_sparse_precision_at_k(predictions,
name: Name of new update operation, and namespace for other dependent ops.
Returns:
- precision: Scalar `float64` `Output` with the value of `true_positives`
+ precision: Scalar `float64` `Tensor` with the value of `true_positives`
divided by the sum of `true_positives` and `false_positives`.
update_op: `Operation` that increments `true_positives` and
`false_positives` variables appropriately, and whose value matches
@@ -1528,11 +1528,11 @@ def streaming_sparse_precision_at_top_k(top_k_predictions,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- top_k_predictions: Integer `Output` with shape [D1, ... DN, k] where
+ top_k_predictions: Integer `Tensor` with shape [D1, ... DN, k] where
N >= 1. Commonly, N=1 and top_k_predictions has shape [batch size, k].
The final dimension contains the indices of top-k labels. [D1, ... DN]
must match `labels`.
- labels: `int64` `Output` or `SparseTensor` with shape
+ labels: `int64` `Tensor` or `SparseTensor` with shape
[D1, ... DN, num_labels], where N >= 1 and num_labels is the number of
target classes for the associated prediction. Commonly, N=1 and `labels`
has shape [batch_size, num_labels]. [D1, ... DN] must match
@@ -1543,7 +1543,7 @@ def streaming_sparse_precision_at_top_k(top_k_predictions,
in range [0, num_classes), where num_classes is the last dimension of
`predictions`. If `class_id` is outside this range, the method returns
NAN.
- weights: An optional `Output` whose shape is broadcastable to the the first
+ weights: An optional `Tensor` whose shape is broadcastable to the the first
[D1, ... DN] dimensions of `predictions` and `labels`.
metrics_collections: An optional list of collections that values should
be added to.
@@ -1552,7 +1552,7 @@ def streaming_sparse_precision_at_top_k(top_k_predictions,
name: Name of new update operation, and namespace for other dependent ops.
Returns:
- precision: Scalar `float64` `Output` with the value of `true_positives`
+ precision: Scalar `float64` `Tensor` with the value of `true_positives`
divided by the sum of `true_positives` and `false_positives`.
update_op: `Operation` that increments `true_positives` and
`false_positives` variables appropriately, and whose value matches
@@ -1590,14 +1590,14 @@ def num_relevant(labels, k):
`num_labels` and `k`.
Args:
- labels: `int64` `Output` or `SparseTensor` with shape
+ labels: `int64` `Tensor` or `SparseTensor` with shape
[D1, ... DN, num_labels], where N >= 1 and num_labels is the number of
target classes for the associated prediction. Commonly, N=1 and `labels`
has shape [batch_size, num_labels].
k: Integer, k for @k metric.
Returns:
- Integer `Output` of shape [D1, ... DN], where each value is the number of
+ Integer `Tensor` of shape [D1, ... DN], where each value is the number of
relevant values for that row.
Raises:
@@ -1627,13 +1627,13 @@ def expand_and_tile(tensor, multiple, dim=0, name=None):
tiled `multiple` times along the new dimension.
Args:
- tensor: Input `Output` or `SparseTensor`.
+ tensor: Input `Tensor` or `SparseTensor`.
multiple: Integer, number of times to tile.
dim: Integer, dimension along which to tile.
name: Name of operation.
Returns:
- `Output` result of expanding and tiling `tensor`.
+ `Tensor` result of expanding and tiling `tensor`.
Raises:
ValueError: if `multiple` is less than 1, or `dim` is not in
@@ -1683,20 +1683,20 @@ def sparse_average_precision_at_k(predictions, labels, k):
AveP = sum_{i=1...k} P_{i} * rel_{i} / num_relevant_items
A "row" is the elements in dimension [D1, ... DN] of `predictions`, `labels`,
- and the result `Output`s. In the common case, this is [batch_size]. Each row
+ and the result `Tensors`. In the common case, this is [batch_size]. Each row
of the results contains the average precision for that row.
- Internally, a `top_k` operation computes an `Output` indicating the top `k`
+ Internally, a `top_k` operation computes a `Tensor` indicating the top `k`
`predictions`. Set operations applied to `top_k` and `labels` calculate the
true positives, which are used to calculate the precision ("P_{i}" term,
above).
Args:
- predictions: Float `Output` with shape [D1, ... DN, num_classes] where
+ predictions: Float `Tensor` with shape [D1, ... DN, num_classes] where
N >= 1. Commonly, N=1 and `predictions` has shape
[batch size, num_classes]. The final dimension contains the logit values
for each class. [D1, ... DN] must match `labels`.
- labels: `int64` `Output` or `SparseTensor` with shape
+ labels: `int64` `Tensor` or `SparseTensor` with shape
[D1, ... DN, num_labels], where N >= 1 and num_labels is the number of
target classes for the associated prediction. Commonly, N=1 and `labels`
has shape [batch_size, num_labels]. [D1, ... DN] must match
@@ -1707,7 +1707,7 @@ def sparse_average_precision_at_k(predictions, labels, k):
range `[1,k]`, as documented above.
Returns:
- `float64` `Output` of shape [D1, ... DN], where each value is the average
+ `float64` `Tensor` of shape [D1, ... DN], where each value is the average
precision for that row.
Raises:
@@ -1785,7 +1785,7 @@ def streaming_sparse_average_precision_at_k(predictions,
For estimation of the metric over a stream of data, the function creates an
`update_op` operation that updates these variables and returns the
- `precision_at_<k>`. Internally, a `top_k` operation computes an `Output`
+ `precision_at_<k>`. Internally, a `top_k` operation computes a `Tensor`
indicating the top `k` `predictions`. Set operations applied to `top_k` and
`labels` calculate the true positives and false positives weighted by
`weights`. Then `update_op` increments `true_positive_at_<k>` and
@@ -1794,11 +1794,11 @@ def streaming_sparse_average_precision_at_k(predictions,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions: Float `Output` with shape [D1, ... DN, num_classes] where
+ predictions: Float `Tensor` with shape [D1, ... DN, num_classes] where
N >= 1. Commonly, N=1 and `predictions` has shape
[batch size, num_classes]. The final dimension contains the logit values
for each class. [D1, ... DN] must match `labels`.
- labels: `int64` `Output` or `SparseTensor` with shape
+ labels: `int64` `Tensor` or `SparseTensor` with shape
[D1, ... DN, num_labels], where N >= 1 and num_labels is the number of
target classes for the associated prediction. Commonly, N=1 and `labels`
has shape [batch_size, num_labels]. [D1, ... DN] must match
@@ -1807,7 +1807,7 @@ def streaming_sparse_average_precision_at_k(predictions,
range are ignored.
k: Integer, k for @k metric. This will calculate an average precision for
range `[1,k]`, as documented above.
- weights: An optional `Output` whose shape is broadcastable to the the first
+ weights: An optional `Tensor` whose shape is broadcastable to the the first
[D1, ... DN] dimensions of `predictions` and `labels`.
metrics_collections: An optional list of collections that values should
be added to.
@@ -1816,7 +1816,7 @@ def streaming_sparse_average_precision_at_k(predictions,
name: Name of new update operation, and namespace for other dependent ops.
Returns:
- mean_average_precision: Scalar `float64` `Output` with the mean average
+ mean_average_precision: Scalar `float64` `Tensor` with the mean average
precision values.
update: `Operation` that increments variables appropriately, and whose
value matches `metric`.
@@ -1871,7 +1871,7 @@ def _select_class_id(ids, selected_id):
"""Filter all but `selected_id` out of `ids`.
Args:
- ids: `int64` `Output` or `SparseTensor` of IDs.
+ ids: `int64` `Tensor` or `SparseTensor` of IDs.
selected_id: Int id to select.
Returns:
@@ -1904,12 +1904,12 @@ def _maybe_select_class_id(labels, predictions_idx, selected_id=None):
"""If class ID is specified, filter all other classes.
Args:
- labels: `int64` `Output` or `SparseTensor` with shape
+ labels: `int64` `Tensor` or `SparseTensor` with shape
[D1, ... DN, num_labels], where N >= 1 and num_labels is the number of
target classes for the associated prediction. Commonly, N=1 and `labels`
has shape [batch_size, num_labels]. [D1, ... DN] must match
`predictions_idx`.
- predictions_idx: `int64` `Output` of class IDs, with shape [D1, ... DN, k]
+ predictions_idx: `int64` `Tensor` of class IDs, with shape [D1, ... DN, k]
where N >= 1. Commonly, N=1 and `predictions_idx` has shape
[batch size, k].
selected_id: Int id to select.
@@ -1936,21 +1936,21 @@ def _sparse_true_positive_at_k(predictions_idx,
`n` label classes, where `n` is the 2nd dimension of `labels_sparse`.
Args:
- predictions_idx: 1-D or higher `int64` `Output` with last dimension `k`,
+ predictions_idx: 1-D or higher `int64` `Tensor` with last dimension `k`,
top `k` predicted classes. For rank `n`, the first `n-1` dimensions must
match `labels`.
- labels: `int64` `Output` or `SparseTensor` with shape
+ labels: `int64` `Tensor` or `SparseTensor` with shape
[D1, ... DN, num_labels], where N >= 1 and num_labels is the number of
target classes for the associated prediction. Commonly, N=1 and `labels`
has shape [batch_size, num_labels]. [D1, ... DN] must match
`predictions_idx`.
class_id: Class for which we want binary metrics.
- weights: `Output` whose shape is broadcastable to the the first [D1, ... DN]
+ weights: `Tensor` whose shape is broadcastable to the the first [D1, ... DN]
dimensions of `predictions_idx` and `labels`.
name: Name of operation.
Returns:
- A [D1, ... DN] `Output` of true positive counts.
+ A [D1, ... DN] `Tensor` of true positive counts.
"""
with ops.name_scope(name, 'true_positives', (predictions_idx, labels)):
labels, predictions_idx = _maybe_select_class_id(
@@ -1979,17 +1979,17 @@ def _streaming_sparse_true_positive_at_k(predictions_idx,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions_idx: 1-D or higher `int64` `Output` with last dimension `k`,
+ predictions_idx: 1-D or higher `int64` `Tensor` with last dimension `k`,
top `k` predicted classes. For rank `n`, the first `n-1` dimensions must
match `labels`.
- labels: `int64` `Output` or `SparseTensor` with shape
+ labels: `int64` `Tensor` or `SparseTensor` with shape
[D1, ... DN, num_labels], where N >= 1 and num_labels is the number of
target classes for the associated prediction. Commonly, N=1 and `labels`
has shape [batch_size, num_labels]. [D1, ... DN] must match
`predictions_idx`.
k: Integer, k for @k metric. This is only used for default op name.
class_id: Class for which we want binary metrics.
- weights: `Output` whose shape is broadcastable to the the first [D1, ... DN]
+ weights: `Tensor` whose shape is broadcastable to the the first [D1, ... DN]
dimensions of `predictions_idx` and `labels`.
name: Name of new variable, and namespace for other dependent ops.
@@ -2023,20 +2023,20 @@ def _sparse_false_positive_at_k(predictions_idx,
`n` label classes, where `n` is the 2nd dimension of `labels_sparse`.
Args:
- predictions_idx: 1-D or higher `int64` `Output` with last dimension `k`,
+ predictions_idx: 1-D or higher `int64` `Tensor` with last dimension `k`,
top `k` predicted classes. For rank `n`, the first `n-1` dimensions must
match `labels`.
- labels: `int64` `Output` or `SparseTensor` with shape
+ labels: `int64` `Tensor` or `SparseTensor` with shape
[D1, ... DN, num_labels], where N >= 1 and num_labels is the number of
target classes for the associated prediction. Commonly, N=1 and `labels`
has shape [batch_size, num_labels]. [D1, ... DN] must match
`predictions_idx`.
class_id: Class for which we want binary metrics.
- weights: `Output` whose shape is broadcastable to the the first [D1, ... DN]
+ weights: `Tensor` whose shape is broadcastable to the the first [D1, ... DN]
dimensions of `predictions_idx` and `labels`.
Returns:
- A [D1, ... DN] `Output` of false positive counts.
+ A [D1, ... DN] `Tensor` of false positive counts.
"""
with ops.name_scope(None, 'false_positives', (predictions_idx, labels)):
labels, predictions_idx = _maybe_select_class_id(labels,
@@ -2067,17 +2067,17 @@ def _streaming_sparse_false_positive_at_k(predictions_idx,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions_idx: 1-D or higher `int64` `Output` with last dimension `k`,
+ predictions_idx: 1-D or higher `int64` `Tensor` with last dimension `k`,
top `k` predicted classes. For rank `n`, the first `n-1` dimensions must
match `labels`.
- labels: `int64` `Output` or `SparseTensor` with shape
+ labels: `int64` `Tensor` or `SparseTensor` with shape
[D1, ... DN, num_labels], where N >= 1 and num_labels is the number of
target classes for the associated prediction. Commonly, N=1 and `labels`
has shape [batch_size, num_labels]. [D1, ... DN] must match
`predictions_idx`.
k: Integer, k for @k metric. This is only used for default op name.
class_id: Class for which we want binary metrics.
- weights: `Output` whose shape is broadcastable to the the first [D1, ... DN]
+ weights: `Tensor` whose shape is broadcastable to the the first [D1, ... DN]
dimensions of `predictions_idx` and `labels`.
name: Name of new variable, and namespace for other dependent ops.
@@ -2111,20 +2111,20 @@ def _sparse_false_negative_at_k(predictions_idx,
`n` label classes, where `n` is the 2nd dimension of `labels_sparse`.
Args:
- predictions_idx: 1-D or higher `int64` `Output` with last dimension `k`,
+ predictions_idx: 1-D or higher `int64` `Tensor` with last dimension `k`,
top `k` predicted classes. For rank `n`, the first `n-1` dimensions must
match `labels`.
- labels: `int64` `Output` or `SparseTensor` with shape
+ labels: `int64` `Tensor` or `SparseTensor` with shape
[D1, ... DN, num_labels], where N >= 1 and num_labels is the number of
target classes for the associated prediction. Commonly, N=1 and `labels`
has shape [batch_size, num_labels]. [D1, ... DN] must match
`predictions_idx`.
class_id: Class for which we want binary metrics.
- weights: `Output` whose shape is broadcastable to the the first [D1, ... DN]
+ weights: `Tensor` whose shape is broadcastable to the the first [D1, ... DN]
dimensions of `predictions_idx` and `labels`.
Returns:
- A [D1, ... DN] `Output` of false negative counts.
+ A [D1, ... DN] `Tensor` of false negative counts.
"""
with ops.name_scope(None, 'false_negatives', (predictions_idx, labels)):
labels, predictions_idx = _maybe_select_class_id(labels,
@@ -2156,17 +2156,17 @@ def _streaming_sparse_false_negative_at_k(predictions_idx,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions_idx: 1-D or higher `int64` `Output` with last dimension `k`,
+ predictions_idx: 1-D or higher `int64` `Tensor` with last dimension `k`,
top `k` predicted classes. For rank `n`, the first `n-1` dimensions must
match `labels`.
- labels: `int64` `Output` or `SparseTensor` with shape
+ labels: `int64` `Tensor` or `SparseTensor` with shape
[D1, ... DN, num_labels], where N >= 1 and num_labels is the number of
target classes for the associated prediction. Commonly, N=1 and `labels`
has shape [batch_size, num_labels]. [D1, ... DN] must match
`predictions_idx`.
k: Integer, k for @k metric. This is only used for default op name.
class_id: Class for which we want binary metrics.
- weights: `Output` whose shape is broadcastable to the the first [D1, ... DN]
+ weights: `Tensor` whose shape is broadcastable to the the first [D1, ... DN]
dimensions of `predictions_idx` and `labels`.
name: Name of new variable, and namespace for other dependent ops.
@@ -2211,9 +2211,9 @@ def streaming_mean_absolute_error(predictions, labels, weights=None,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions: An `Output` of arbitrary shape.
- labels: An `Output` of the same shape as `predictions`.
- weights: An optional `Output` whose shape is broadcastable to `predictions`.
+ predictions: A `Tensor` of arbitrary shape.
+ labels: A `Tensor` of the same shape as `predictions`.
+ weights: An optional `Tensor` whose shape is broadcastable to `predictions`.
metrics_collections: An optional list of collections that
`mean_absolute_error` should be added to.
updates_collections: An optional list of collections that `update_op` should
@@ -2263,10 +2263,10 @@ def streaming_mean_relative_error(predictions, labels, normalizer, weights=None,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions: An `Output` of arbitrary shape.
- labels: An `Output` of the same shape as `predictions`.
- normalizer: An `Output` of the same shape as `predictions`.
- weights: An optional `Output` whose shape is broadcastable to `predictions`.
+ predictions: A `Tensor` of arbitrary shape.
+ labels: A `Tensor` of the same shape as `predictions`.
+ normalizer: A `Tensor` of the same shape as `predictions`.
+ weights: An optional `Tensor` whose shape is broadcastable to `predictions`.
metrics_collections: An optional list of collections that
`mean_relative_error` should be added to.
updates_collections: An optional list of collections that `update_op` should
@@ -2323,9 +2323,9 @@ def streaming_mean_squared_error(predictions, labels, weights=None,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions: An `Output` of arbitrary shape.
- labels: An `Output` of the same shape as `predictions`.
- weights: An optional `Output` whose shape is broadcastable to `predictions`.
+ predictions: A `Tensor` of arbitrary shape.
+ labels: A `Tensor` of the same shape as `predictions`.
+ weights: An optional `Tensor` whose shape is broadcastable to `predictions`.
metrics_collections: An optional list of collections that
`mean_squared_error` should be added to.
updates_collections: An optional list of collections that `update_op` should
@@ -2375,9 +2375,9 @@ def streaming_root_mean_squared_error(predictions, labels, weights=None,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions: An `Output` of arbitrary shape.
- labels: An `Output` of the same shape as `predictions`.
- weights: An optional `Output` whose shape is broadcastable to `predictions`.
+ predictions: A `Tensor` of arbitrary shape.
+ labels: A `Tensor` of the same shape as `predictions`.
+ weights: An optional `Tensor` whose shape is broadcastable to `predictions`.
metrics_collections: An optional list of collections that
`root_mean_squared_error` should be added to.
updates_collections: An optional list of collections that `update_op` should
@@ -2448,8 +2448,8 @@ def streaming_covariance(predictions,
variables and returns the updated covariance.
Args:
- predictions: An `Output` of arbitrary size.
- labels: An `Output` of the same size as `predictions`.
+ predictions: A `Tensor` of arbitrary size.
+ labels: A `Tensor` of the same size as `predictions`.
weights: An optional set of weights which indicates the frequency with which
an example is sampled. Must be broadcastable with `labels`.
metrics_collections: An optional list of collections that the metric
@@ -2459,7 +2459,7 @@ def streaming_covariance(predictions,
name: An optional variable_scope name.
Returns:
- covariance: An `Output` representing the current unbiased sample covariance,
+ covariance: A `Tensor` representing the current unbiased sample covariance,
`comoment` / (`count` - 1).
update_op: An operation that updates the local variables appropriately.
@@ -2569,8 +2569,8 @@ def streaming_pearson_correlation(predictions,
https://wikipedia.org/wiki/Weighted_arithmetic_mean#Weighted_sample_variance
Args:
- predictions: An `Output` of arbitrary size.
- labels: An `Output` of the same size as predictions.
+ predictions: A `Tensor` of arbitrary size.
+ labels: A `Tensor` of the same size as predictions.
weights: An optional set of weights which indicates the frequency with which
an example is sampled. Must be broadcastable with `labels`.
metrics_collections: An optional list of collections that the metric
@@ -2641,10 +2641,10 @@ def streaming_mean_cosine_distance(predictions, labels, dim, weights=None,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- predictions: An `Output` of the same shape as `labels`.
- labels: An `Output` of arbitrary shape.
+ predictions: A `Tensor` of the same shape as `labels`.
+ labels: A `Tensor` of arbitrary shape.
dim: The dimension along which the cosine distance is computed.
- weights: An optional `Output` whose shape is broadcastable to `predictions`,
+ weights: An optional `Tensor` whose shape is broadcastable to `predictions`,
and whose dimension `dim` is 1.
metrics_collections: An optional list of collections that the metric
value variable should be added to.
@@ -2706,9 +2706,9 @@ def streaming_percentage_less(values, threshold, weights=None,
If `weights` is `None`, weights default to 1. Use weights of 0 to mask values.
Args:
- values: A numeric `Output` of arbitrary size.
+ values: A numeric `Tensor` of arbitrary size.
threshold: A scalar threshold.
- weights: An optional `Output` whose shape is broadcastable to `values`.
+ weights: An optional `Tensor` whose shape is broadcastable to `values`.
metrics_collections: An optional list of collections that the metric
value variable should be added to.
updates_collections: An optional list of collections that the metric update
@@ -2765,7 +2765,7 @@ def streaming_mean_iou(predictions,
num_classes: The possible number of labels the prediction task can
have. This value must be provided, since a confusion matrix of
dimension = [num_classes, num_classes] will be allocated.
- weights: An optional `Output` whose shape is broadcastable to `predictions`.
+ weights: An optional `Tensor` whose shape is broadcastable to `predictions`.
metrics_collections: An optional list of collections that `mean_iou`
should be added to.
updates_collections: An optional list of collections `update_op` should be
@@ -3033,8 +3033,8 @@ def _remove_squeezable_dimensions(predictions, labels, weights):
operations, which could result in a performance hit.
Args:
- predictions: Predicted values, an `Output` of arbitrary dimensions.
- labels: Label values, an `Output` whose dimensions match `predictions`.
+ predictions: Predicted values, a `Tensor` of arbitrary dimensions.
+ labels: Label values, a `Tensor` whose dimensions match `predictions`.
weights: optional `weights` tensor. It will be squeezed if its rank is 1
more than the new rank of `predictions`
diff --git a/tensorflow/contrib/metrics/python/ops/set_ops.py b/tensorflow/contrib/metrics/python/ops/set_ops.py
index 650af4a8c9..dd737a14c2 100644
--- a/tensorflow/contrib/metrics/python/ops/set_ops.py
+++ b/tensorflow/contrib/metrics/python/ops/set_ops.py
@@ -43,7 +43,7 @@ def set_size(a, validate_indices=True):
in `a`.
Returns:
- `int32` `Output` of set sizes. For `a` ranked `n`, this is an `Output` with
+ `int32` `Tensor` of set sizes. For `a` ranked `n`, this is a `Tensor` with
rank `n-1`, and the same 1st `n-1` dimensions as `a`. Each value is the
number of unique elements in the corresponding `[0...n-1]` dimension of `a`.
@@ -72,9 +72,9 @@ def _set_operation(a, b, set_operation, validate_indices=True):
All but the last dimension of `a` and `b` must match.
Args:
- a: `Output` or `SparseTensor` of the same type as `b`. If sparse, indices
+ a: `Tensor` or `SparseTensor` of the same type as `b`. If sparse, indices
must be sorted in row-major order.
- b: `Output` or `SparseTensor` of the same type as `a`. Must be
+ b: `Tensor` or `SparseTensor` of the same type as `a`. Must be
`SparseTensor` if `a` is `SparseTensor`. If sparse, indices must be
sorted in row-major order.
set_operation: String indicating set operaiton. See
@@ -122,9 +122,9 @@ def set_intersection(a, b, validate_indices=True):
All but the last dimension of `a` and `b` must match.
Args:
- a: `Output` or `SparseTensor` of the same type as `b`. If sparse, indices
+ a: `Tensor` or `SparseTensor` of the same type as `b`. If sparse, indices
must be sorted in row-major order.
- b: `Output` or `SparseTensor` of the same type as `a`. Must be
+ b: `Tensor` or `SparseTensor` of the same type as `a`. Must be
`SparseTensor` if `a` is `SparseTensor`. If sparse, indices must be
sorted in row-major order.
validate_indices: Whether to validate the order and range of sparse indices
@@ -144,9 +144,9 @@ def set_difference(a, b, aminusb=True, validate_indices=True):
All but the last dimension of `a` and `b` must match.
Args:
- a: `Output` or `SparseTensor` of the same type as `b`. If sparse, indices
+ a: `Tensor` or `SparseTensor` of the same type as `b`. If sparse, indices
must be sorted in row-major order.
- b: `Output` or `SparseTensor` of the same type as `a`. Must be
+ b: `Tensor` or `SparseTensor` of the same type as `a`. Must be
`SparseTensor` if `a` is `SparseTensor`. If sparse, indices must be
sorted in row-major order.
aminusb: Whether to subtract `b` from `a`, vs vice versa.
@@ -167,9 +167,9 @@ def set_union(a, b, validate_indices=True):
All but the last dimension of `a` and `b` must match.
Args:
- a: `Output` or `SparseTensor` of the same type as `b`. If sparse, indices
+ a: `Tensor` or `SparseTensor` of the same type as `b`. If sparse, indices
must be sorted in row-major order.
- b: `Output` or `SparseTensor` of the same type as `a`. Must be
+ b: `Tensor` or `SparseTensor` of the same type as `a`. Must be
`SparseTensor` if `a` is `SparseTensor`. If sparse, indices must be
sorted in row-major order.
validate_indices: Whether to validate the order and range of sparse indices
diff --git a/tensorflow/contrib/opt/python/training/external_optimizer.py b/tensorflow/contrib/opt/python/training/external_optimizer.py
index e600fc1723..de539a46e2 100644
--- a/tensorflow/contrib/opt/python/training/external_optimizer.py
+++ b/tensorflow/contrib/opt/python/training/external_optimizer.py
@@ -48,13 +48,13 @@ class ExternalOptimizerInterface(object):
"""Initialize a new interface instance.
Args:
- loss: A scalar `Output` to be minimized.
+ loss: A scalar `Tensor` to be minimized.
var_list: Optional list of `Variable` objects to update to minimize
`loss`. Defaults to the list of variables collected in the graph
under the key `GraphKeys.TRAINABLE_VARIABLES`.
- equalities: Optional list of equality constraint scalar `Output`s to be
+ equalities: Optional list of equality constraint scalar `Tensor`s to be
held equal to zero.
- inequalities: Optional list of inequality constraint scalar `Output`s
+ inequalities: Optional list of inequality constraint scalar `Tensor`s
to be kept nonnegative.
**optimizer_kwargs: Other subclass-specific keyword arguments.
"""
@@ -101,7 +101,7 @@ class ExternalOptimizerInterface(object):
def minimize(self, session=None, feed_dict=None, fetches=None,
step_callback=None, loss_callback=None):
- """Minimize a scalar `Output`.
+ """Minimize a scalar `Tensor`.
Variables subject to optimization are updated in-place at the end of
optimization.
@@ -113,7 +113,7 @@ class ExternalOptimizerInterface(object):
Args:
session: A `Session` instance.
feed_dict: A feed dict to be passed to calls to `session.run`.
- fetches: A list of `Output`s to fetch and supply to `loss_callback`
+ fetches: A list of `Tensor`s to fetch and supply to `loss_callback`
as positional arguments.
step_callback: A function to be called at each optimization step;
arguments are the current values of all optimization variables
@@ -196,7 +196,7 @@ class ExternalOptimizerInterface(object):
@classmethod
def _pack(cls, tensors):
- """Pack a list of `Output`s into a single, flattened, rank-1 `Output`."""
+ """Pack a list of `Tensor`s into a single, flattened, rank-1 `Tensor`."""
if not tensors:
return None
elif len(tensors) == 1:
@@ -207,13 +207,13 @@ class ExternalOptimizerInterface(object):
def _make_eval_func(self, tensors, session, feed_dict, fetches,
callback=None):
- """Construct a function that evaluates an `Output` or list of `Output`s."""
+ """Construct a function that evaluates a `Tensor` or list of `Tensor`s."""
if not isinstance(tensors, list):
tensors = [tensors]
num_tensors = len(tensors)
def eval_func(x):
- """Function to evaluate an `Output`."""
+ """Function to evaluate a `Tensor`."""
augmented_feed_dict = {
var: x[packing_slice].reshape(_get_shape_tuple(var))
for var, packing_slice in zip(self._vars, self._packing_slices)
diff --git a/tensorflow/contrib/rnn/python/ops/lstm_ops.py b/tensorflow/contrib/rnn/python/ops/lstm_ops.py
index 82d0486f7e..3e8998f117 100644
--- a/tensorflow/contrib/rnn/python/ops/lstm_ops.py
+++ b/tensorflow/contrib/rnn/python/ops/lstm_ops.py
@@ -76,19 +76,19 @@ def _lstm_block_cell(x,
```
Args:
- x: An `Output`. Must be one of the following types: `float32`.
+ x: A `Tensor`. Must be one of the following types: `float32`.
The input to the LSTM cell, shape (batch_size, num_inputs).
- cs_prev: An `Output`. Must have the same type as `x`.
+ cs_prev: A `Tensor`. Must have the same type as `x`.
Value of the cell state at previous time step.
- h_prev: An `Output`. Must have the same type as `x`.
+ h_prev: A `Tensor`. Must have the same type as `x`.
Output of the previous cell at previous time step.
- w: An `Output`. Must have the same type as `x`. The weight matrix.
- b: An `Output`. Must have the same type as `x`. The bias vector.
- wci: An `Output`. Must have the same type as `x`.
+ w: A `Tensor`. Must have the same type as `x`. The weight matrix.
+ b: A `Tensor`. Must have the same type as `x`. The bias vector.
+ wci: A `Tensor`. Must have the same type as `x`.
The weight matrix for input gate peephole connection.
- wcf: An `Output`. Must have the same type as `x`.
+ wcf: A `Tensor`. Must have the same type as `x`.
The weight matrix for forget gate peephole connection.
- wco: An `Output`. Must have the same type as `x`.
+ wco: A `Tensor`. Must have the same type as `x`.
The weight matrix for output gate peephole connection.
forget_bias: An optional `float`. Defaults to `1`. The forget gate bias.
cell_clip: An optional `float`. Defaults to `3`.
@@ -98,14 +98,14 @@ def _lstm_block_cell(x,
name: A name for the operation (optional).
Returns:
- A tuple of `Output` objects (i, cs, f, o, ci, co, h).
- i: An `Output`. Has the same type as `x`. The input gate.
- cs: An `Output`. Has the same type as `x`. The cell state before the tanh.
- f: An `Output`. Has the same type as `x`. The forget gate.
- o: An `Output`. Has the same type as `x`. The output gate.
- ci: An `Output`. Has the same type as `x`. The cell input.
- co: An `Output`. Has the same type as `x`. The cell after the tanh.
- h: An `Output`. Has the same type as `x`. The output h vector.
+ A tuple of `Tensor` objects (i, cs, f, o, ci, co, h).
+ i: A `Tensor`. Has the same type as `x`. The input gate.
+ cs: A `Tensor`. Has the same type as `x`. The cell state before the tanh.
+ f: A `Tensor`. Has the same type as `x`. The forget gate.
+ o: A `Tensor`. Has the same type as `x`. The output gate.
+ ci: A `Tensor`. Has the same type as `x`. The cell input.
+ co: A `Tensor`. Has the same type as `x`. The cell after the tanh.
+ h: A `Tensor`. Has the same type as `x`. The output h vector.
Raises:
ValueError: If cell_size is None.
@@ -151,35 +151,35 @@ def _block_lstm(seq_len_max,
r"""TODO(williamchan): add doc.
Args:
- seq_len_max: An `Output` of type `int64`.
- x: A list of at least 1 `Output` objects of the same type in: `float32`.
- w: An `Output`. Must have the same type as `x`.
- b: An `Output`. Must have the same type as `x`.
- cs_prev: An `Output`. Must have the same type as `x`.
- h_prev: An `Output`. Must have the same type as `x`.
- wci: An `Output`. Must have the same type as `x`.
- wcf: An `Output`. Must have the same type as `x`.
- wco: An `Output`. Must have the same type as `x`.
+ seq_len_max: A `Tensor` of type `int64`.
+ x: A list of at least 1 `Tensor` objects of the same type in: `float32`.
+ w: A `Tensor`. Must have the same type as `x`.
+ b: A `Tensor`. Must have the same type as `x`.
+ cs_prev: A `Tensor`. Must have the same type as `x`.
+ h_prev: A `Tensor`. Must have the same type as `x`.
+ wci: A `Tensor`. Must have the same type as `x`.
+ wcf: A `Tensor`. Must have the same type as `x`.
+ wco: A `Tensor`. Must have the same type as `x`.
forget_bias: An optional `float`. Defaults to `1`.
cell_clip: An optional `float`. Defaults to `3`.
use_peephole: An optional `bool`. Defaults to `False`.
name: A name for the operation (optional).
Returns:
- A tuple of `Output` objects (i, cs, f, o, ci, co, h).
- i: A list with the same number of `Output` objects as `x` of `Output`
+ A tuple of `Tensor` objects (i, cs, f, o, ci, co, h).
+ i: A list with the same number of `Tensor` objects as `x` of `Tensor`
objects of the same type as x.
- cs: A list with the same number of `Output` objects as `x` of `Output`
+ cs: A list with the same number of `Tensor` objects as `x` of `Tensor`
objects of the same type as x.
- f: A list with the same number of `Output` objects as `x` of `Output`
+ f: A list with the same number of `Tensor` objects as `x` of `Tensor`
objects of the same type as x.
- o: A list with the same number of `Output` objects as `x` of `Output`
+ o: A list with the same number of `Tensor` objects as `x` of `Tensor`
objects of the same type as x.
- ci: A list with the same number of `Output` objects as `x` of `Output`
+ ci: A list with the same number of `Tensor` objects as `x` of `Tensor`
objects of the same type as x.
- co: A list with the same number of `Output` objects as `x` of `Output`
+ co: A list with the same number of `Tensor` objects as `x` of `Tensor`
objects of the same type as x.
- h: A list with the same number of `Output` objects as `x` of `Output`
+ h: A list with the same number of `Tensor` objects as `x` of `Tensor`
objects of the same type as x.
Raises:
diff --git a/tensorflow/contrib/rnn/python/ops/rnn.py b/tensorflow/contrib/rnn/python/ops/rnn.py
index 214c73c124..d4df308042 100644
--- a/tensorflow/contrib/rnn/python/ops/rnn.py
+++ b/tensorflow/contrib/rnn/python/ops/rnn.py
@@ -157,7 +157,7 @@ def stack_bidirectional_dynamic_rnn(cells_fw,
Returns:
A tuple (outputs, output_state_fw, output_state_bw) where:
- outputs: Output `Output` shaped:
+ outputs: Output `Tensor` shaped:
`batch_size, max_time, layers_output]`. Where layers_output
are depth-concatenated forward and backward outputs.
output_states_fw is the final states, one tensor per layer,
diff --git a/tensorflow/contrib/slim/python/slim/data/data_decoder.py b/tensorflow/contrib/slim/python/slim/data/data_decoder.py
index f09c2b43ec..2fa5db0153 100644
--- a/tensorflow/contrib/slim/python/slim/data/data_decoder.py
+++ b/tensorflow/contrib/slim/python/slim/data/data_decoder.py
@@ -54,8 +54,8 @@ class DataDecoder(object):
items: A list of strings, each of which indicate a particular data type.
Returns:
- A list of `Output`s, whose length matches the length of `items`, where
- each `Output` corresponds to each item.
+ A list of `Tensors`, whose length matches the length of `items`, where
+ each `Tensor` corresponds to each item.
Raises:
ValueError: If any of the items cannot be satisfied.
diff --git a/tensorflow/contrib/slim/python/slim/data/prefetch_queue.py b/tensorflow/contrib/slim/python/slim/data/prefetch_queue.py
index d3ad3bffa5..9cfd598b8d 100644
--- a/tensorflow/contrib/slim/python/slim/data/prefetch_queue.py
+++ b/tensorflow/contrib/slim/python/slim/data/prefetch_queue.py
@@ -46,7 +46,7 @@ def prefetch_queue(tensors,
loss = Loss(logits, labels)
Args:
- tensors: A list or dictionary of `Output`s to enqueue in the buffer.
+ tensors: A list or dictionary of `Tensors` to enqueue in the buffer.
capacity: An integer. The maximum number of elements in the queue.
shared_name: (optional). If set, this queue will be shared under the given
name across multiple sessions.
diff --git a/tensorflow/contrib/slim/python/slim/data/tfexample_decoder.py b/tensorflow/contrib/slim/python/slim/data/tfexample_decoder.py
index b952040c30..e0273096a0 100644
--- a/tensorflow/contrib/slim/python/slim/data/tfexample_decoder.py
+++ b/tensorflow/contrib/slim/python/slim/data/tfexample_decoder.py
@@ -149,11 +149,11 @@ class Tensor(ItemHandler):
Tensors are, by default, returned without any reshaping. However, there are
two mechanisms which allow reshaping to occur at load time. If `shape_keys`
- is provided, both the `Output` corresponding to `tensor_key` and
- `shape_keys` is loaded and the former `Output` is reshaped with the values
- of the latter. Alternatively, if a fixed `shape` is provided, the `Output`
+ is provided, both the `Tensor` corresponding to `tensor_key` and
+ `shape_keys` is loaded and the former `Tensor` is reshaped with the values
+ of the latter. Alternatively, if a fixed `shape` is provided, the `Tensor`
corresponding to `tensor_key` is loaded and reshape appropriately.
- If neither `shape_keys` nor `shape` are provided, the `Output` will be
+ If neither `shape_keys` nor `shape` are provided, the `Tensor` will be
returned without any reshaping.
Args:
@@ -161,7 +161,7 @@ class Tensor(ItemHandler):
shape_keys: Optional name or list of names of the TF-Example feature in
which the tensor shape is stored. If a list, then each corresponds to
one dimension of the shape.
- shape: Optional output shape of the `Output`. If provided, the `Output` is
+ shape: Optional output shape of the `Tensor`. If provided, the `Tensor` is
reshaped accordingly.
default_value: The value used when the `tensor_key` is not found in a
particular `TFExample`.
diff --git a/tensorflow/contrib/slim/python/slim/learning.py b/tensorflow/contrib/slim/python/slim/learning.py
index 9000c43229..6d8446bf88 100644
--- a/tensorflow/contrib/slim/python/slim/learning.py
+++ b/tensorflow/contrib/slim/python/slim/learning.py
@@ -386,9 +386,9 @@ def create_train_op(
"""Creates an `Operation` that evaluates the gradients and returns the loss.
Args:
- total_loss: An `Output` representing the total loss.
+ total_loss: A `Tensor` representing the total loss.
optimizer: A tf.Optimizer to use for computing the gradients.
- global_step: An `Output` representing the global step variable. If left as
+ global_step: A `Tensor` representing the global step variable. If left as
`None`, then slim.variables.global_step() is used.
update_ops: An optional list of updates to execute. If `update_ops` is
`None`, then the update ops are set to the contents of the
@@ -409,8 +409,8 @@ def create_train_op(
names to the coefficient by which the associated gradient should be
scaled.
Returns:
- An `Output` that when evaluated, computes the gradients and returns the
- total loss value.
+ A `Tensor` that when evaluated, computes the gradients and returns the total
+ loss value.
"""
if global_step is None:
global_step = variables.get_or_create_global_step()
@@ -503,7 +503,7 @@ def train_step(sess, train_op, global_step, train_step_kwargs):
sess: The current session.
train_op: An `Operation` that evaluates the gradients and returns the
total loss.
- global_step: An `Output` representing the global training step.
+ global_step: A `Tensor` representing the global training step.
train_step_kwargs: A dictionary of keyword arguments.
Returns:
@@ -600,13 +600,13 @@ def train(train_op,
synchronously. Otherwise, gradient updates are applied asynchronous.
Args:
- train_op: An `Output` that, when executed, will apply the gradients and
+ train_op: A `Tensor` that, when executed, will apply the gradients and
return the loss value.
logdir: The directory where training logs are written to. If None, model
checkpoints and summaries will not be written.
train_step_fn: The function to call in order to execute a single gradient
step. The function must have take exactly four arguments: the current
- session, the `train_op` `Output`, a global step `Output` and a dictionary.
+ session, the `train_op` `Tensor`, a global step `Tensor` and a dictionary.
train_step_kwargs: A dictionary which is passed to the `train_step_fn`. By
default, two `Boolean`, scalar ops called "should_stop" and "should_log"
are provided.
@@ -617,7 +617,7 @@ def train(train_op,
master: The address of the tensorflow master.
is_chief: Specifies whether or not the training is being run by the primary
replica during replica training.
- global_step: The `Output` representing the global step. If left as `None`,
+ global_step: The `Tensor` representing the global step. If left as `None`,
then slim.variables.get_or_create_global_step() is used.
number_of_steps: The max number of gradient steps to take during training.
If the value is left as None, training proceeds indefinitely.
diff --git a/tensorflow/contrib/slim/python/slim/nets/resnet_utils.py b/tensorflow/contrib/slim/python/slim/nets/resnet_utils.py
index 2af5a753ba..de8c2effc2 100644
--- a/tensorflow/contrib/slim/python/slim/nets/resnet_utils.py
+++ b/tensorflow/contrib/slim/python/slim/nets/resnet_utils.py
@@ -48,8 +48,8 @@ class Block(collections.namedtuple('Block', ['scope', 'unit_fn', 'args'])):
Its parts are:
scope: The scope of the `Block`.
- unit_fn: The ResNet unit function which takes as input an `Output` and
- returns another `Output` with the output of the ResNet unit.
+ unit_fn: The ResNet unit function which takes as input a `Tensor` and
+ returns another `Tensor` with the output of the ResNet unit.
args: A list of length equal to the number of units in the `Block`. The list
contains one (depth, depth_bottleneck, stride) tuple for each unit in the
block to serve as argument to unit_fn.
@@ -60,13 +60,13 @@ def subsample(inputs, factor, scope=None):
"""Subsamples the input along the spatial dimensions.
Args:
- inputs: An `Output` of size [batch, height_in, width_in, channels].
+ inputs: A `Tensor` of size [batch, height_in, width_in, channels].
factor: The subsampling factor.
scope: Optional variable_scope.
Returns:
- output: An `Output` of size [batch, height_out, width_out, channels] with
- the input, either intact (if factor == 1) or subsampled (if factor > 1).
+ output: A `Tensor` of size [batch, height_out, width_out, channels] with the
+ input, either intact (if factor == 1) or subsampled (if factor > 1).
"""
if factor == 1:
return inputs
@@ -144,7 +144,7 @@ def stack_blocks_dense(net, blocks, output_stride=None,
Control of the output feature density is implemented by atrous convolution.
Args:
- net: An `Output` of size [batch, height, width, channels].
+ net: A `Tensor` of size [batch, height, width, channels].
blocks: A list of length equal to the number of ResNet `Blocks`. Each
element is a ResNet `Block` object describing the units in the `Block`.
output_stride: If `None`, then the output will be computed at the nominal
diff --git a/tensorflow/contrib/slim/python/slim/nets/resnet_v1_test.py b/tensorflow/contrib/slim/python/slim/nets/resnet_v1_test.py
index bc6b3d6347..a53694ac13 100644
--- a/tensorflow/contrib/slim/python/slim/nets/resnet_v1_test.py
+++ b/tensorflow/contrib/slim/python/slim/nets/resnet_v1_test.py
@@ -37,9 +37,9 @@ def create_test_input(batch_size, height, width, channels):
channels: The number of channels per image or `None` if unknown.
Returns:
- Either a placeholder `Output` of dimension
+ Either a placeholder `Tensor` of dimension
[batch_size, height, width, channels] if any of the inputs are `None` or a
- constant `Output` with the mesh grid values along the spatial dimensions.
+ constant `Tensor` with the mesh grid values along the spatial dimensions.
"""
if None in [batch_size, height, width, channels]:
return tf.placeholder(tf.float32, (batch_size, height, width, channels))
diff --git a/tensorflow/contrib/slim/python/slim/nets/resnet_v2_test.py b/tensorflow/contrib/slim/python/slim/nets/resnet_v2_test.py
index 54cf328f00..2c23471633 100644
--- a/tensorflow/contrib/slim/python/slim/nets/resnet_v2_test.py
+++ b/tensorflow/contrib/slim/python/slim/nets/resnet_v2_test.py
@@ -37,9 +37,9 @@ def create_test_input(batch_size, height, width, channels):
channels: The number of channels per image or `None` if unknown.
Returns:
- Either a placeholder `Output` of dimension
+ Either a placeholder `Tensor` of dimension
[batch_size, height, width, channels] if any of the inputs are `None` or a
- constant `Output` with the mesh grid values along the spatial dimensions.
+ constant `Tensor` with the mesh grid values along the spatial dimensions.
"""
if None in [batch_size, height, width, channels]:
return tf.placeholder(tf.float32, (batch_size, height, width, channels))
diff --git a/tensorflow/contrib/solvers/python/ops/lanczos.py b/tensorflow/contrib/solvers/python/ops/lanczos.py
index 0a6c17eea2..2dfc9763a3 100644
--- a/tensorflow/contrib/solvers/python/ops/lanczos.py
+++ b/tensorflow/contrib/solvers/python/ops/lanczos.py
@@ -46,7 +46,7 @@ def lanczos_bidiag(operator,
Args:
operator: An object representing a linear operator with attributes:
- - shape: Either a list of integers or a 1-D `Output` of type `int32` of
+ - shape: Either a list of integers or a 1-D `Tensor` of type `int32` of
length 2. `shape[0]` is the dimension on the domain of the operator,
`shape[1]` is the dimension of the co-domain of the operator. On other
words, if operator represents an M x N matrix A, `shape` must contain
@@ -65,20 +65,20 @@ def lanczos_bidiag(operator,
may terminate before `k` steps have been run.
orthogonalize: If `True`, perform full orthogonalization. If `False` no
orthogonalization is performed.
- starting_vector: If not null, must be an `Output` of shape `[n]`.
+ starting_vector: If not null, must be a `Tensor` of shape `[n]`.
name: A name scope for the operation.
Returns:
output: A namedtuple representing a Lanczos bidiagonalization of
`operator` with attributes:
- u: A rank-2 `Output` of type `operator.dtype` and shape
+ u: A rank-2 `Tensor` of type `operator.dtype` and shape
`[operator.shape[0], k_actual+1]`, where `k_actual` is the number of
steps run.
- v: A rank-2 `Output` of type `operator.dtype` and shape
+ v: A rank-2 `Tensor` of type `operator.dtype` and shape
`[operator.shape[1], k_actual]`, where `k_actual` is the number of steps
run.
- alpha: A rank-1 `Output` of type `operator.dtype` and shape `[k]`.
- beta: A rank-1 `Output` of type `operator.dtype` and shape `[k]`.
+ alpha: A rank-1 `Tensor` of type `operator.dtype` and shape `[k]`.
+ beta: A rank-1 `Tensor` of type `operator.dtype` and shape `[k]`.
"""
def tarray(size, dtype, name):
@@ -209,9 +209,9 @@ def bidiag_matmul(matrix, alpha, beta, adjoint_b=False, name="bidiag_matmul"):
A * diag(alpha) + [zeros(m,1), A[:, :-1] * diag(beta[:-1])]
Args:
- matrix: A rank-2 `Output` representing matrix A.
- alpha: A rank-1 `Output` representing the diagonal of B.
- beta: A rank-1 `Output` representing the lower subdiagonal diagonal of B.
+ matrix: A rank-2 `Tensor` representing matrix A.
+ alpha: A rank-1 `Tensor` representing the diagonal of B.
+ beta: A rank-1 `Tensor` representing the lower subdiagonal diagonal of B.
adjoint_b: `bool` determining what to compute.
name: A name scope for the operation.
diff --git a/tensorflow/contrib/solvers/python/ops/least_squares.py b/tensorflow/contrib/solvers/python/ops/least_squares.py
index f80910ffe7..9a2d3b24dd 100644
--- a/tensorflow/contrib/solvers/python/ops/least_squares.py
+++ b/tensorflow/contrib/solvers/python/ops/least_squares.py
@@ -40,7 +40,7 @@ def cgls(operator, rhs, tol=1e-6, max_iter=20, name="cgls"):
Args:
operator: An object representing a linear operator with attributes:
- - shape: Either a list of integers or a 1-D `Output` of type `int32` of
+ - shape: Either a list of integers or a 1-D `Tensor` of type `int32` of
length 2. `shape[0]` is the dimension on the domain of the operator,
`shape[1]` is the dimension of the co-domain of the operator. On other
words, if operator represents an M x N matrix A, `shape` must contain
@@ -55,7 +55,7 @@ def cgls(operator, rhs, tol=1e-6, max_iter=20, name="cgls"):
to `x`, i.e. if `operator` represents matrix `A`, `apply_adjoint` should
return `conj(transpose(A)) * x`.
- rhs: A rank-1 `Output` of shape `[M]` containing the right-hand size vector.
+ rhs: A rank-1 `Tensor` of shape `[M]` containing the right-hand size vector.
tol: A float scalar convergence tolerance.
max_iter: An integer giving the maximum number of iterations.
name: A name scope for the operation.
@@ -63,10 +63,10 @@ def cgls(operator, rhs, tol=1e-6, max_iter=20, name="cgls"):
Returns:
output: A namedtuple representing the final state with fields:
- - i: A scalar `int32` `Output`. Number of iterations executed.
- - x: A rank-1 `Output` of shape `[N]` containing the computed solution.
- - r: A rank-1 `Output` of shape `[M]` containing the residual vector.
- - p: A rank-1 `Output` of shape `[N]`. The next descent direction.
+ - i: A scalar `int32` `Tensor`. Number of iterations executed.
+ - x: A rank-1 `Tensor` of shape `[N]` containing the computed solution.
+ - r: A rank-1 `Tensor` of shape `[M]` containing the residual vector.
+ - p: A rank-1 `Tensor` of shape `[N]`. The next descent direction.
- gamma: \\(||A^* r||_2^2\\)
"""
# ephemeral class holding CGLS state.
diff --git a/tensorflow/contrib/solvers/python/ops/linear_equations.py b/tensorflow/contrib/solvers/python/ops/linear_equations.py
index 38c94addd0..41fd6e466b 100644
--- a/tensorflow/contrib/solvers/python/ops/linear_equations.py
+++ b/tensorflow/contrib/solvers/python/ops/linear_equations.py
@@ -41,7 +41,7 @@ def conjugate_gradient(operator,
Args:
operator: An object representing a linear operator with attributes:
- - shape: Either a list of integers or a 1-D `Output` of type `int32` of
+ - shape: Either a list of integers or a 1-D `Tensor` of type `int32` of
length 2. `shape[0]` is the dimension on the domain of the operator,
`shape[1]` is the dimension of the co-domain of the operator. On other
words, if operator represents an N x N matrix A, `shape` must contain
@@ -50,17 +50,17 @@ def conjugate_gradient(operator,
- apply: Callable object taking a vector `x` as input and returning a
vector with the result of applying the operator to `x`, i.e. if
`operator` represents matrix `A`, `apply` should return `A * x`.
- rhs: A rank-1 `Output` of shape `[N]` containing the right-hand size vector.
+ rhs: A rank-1 `Tensor` of shape `[N]` containing the right-hand size vector.
tol: A float scalar convergence tolerance.
max_iter: An integer giving the maximum number of iterations.
name: A name scope for the operation.
Returns:
output: A namedtuple representing the final state with fields:
- - i: A scalar `int32` `Output`. Number of iterations executed.
- - x: A rank-1 `Output` of shape `[N]` containing the computed solution.
- - r: A rank-1 `Output` of shape `[M]` containing the residual vector.
- - p: A rank-1 `Output` of shape `[N]`. `A`-conjugate basis vector.
+ - i: A scalar `int32` `Tensor`. Number of iterations executed.
+ - x: A rank-1 `Tensor` of shape `[N]` containing the computed solution.
+ - r: A rank-1 `Tensor` of shape `[M]` containing the residual vector.
+ - p: A rank-1 `Tensor` of shape `[N]`. `A`-conjugate basis vector.
- gamma: \\(||r||_2^2\\)
"""
# ephemeral class holding CG state.
diff --git a/tensorflow/contrib/tensor_forest/data/data_ops.py b/tensorflow/contrib/tensor_forest/data/data_ops.py
index af1cc95b74..8bcccaea34 100644
--- a/tensorflow/contrib/tensor_forest/data/data_ops.py
+++ b/tensorflow/contrib/tensor_forest/data/data_ops.py
@@ -64,7 +64,7 @@ def ParseDataTensorOrDict(data):
columns, which we turn into a single 2-D tensor.
Args:
- data: `Output` or `dict` of `Output` objects.
+ data: `Tensor` or `dict` of `Tensor` objects.
Returns:
A 2-D tensor for input to tensor_forest, a keys tensor for the
@@ -112,7 +112,7 @@ def ParseLabelTensorOrDict(labels):
Converts sparse tensors to dense ones.
Args:
- labels: `Output` or `dict` of `Output` objects.
+ labels: `Tensor` or `dict` of `Tensor` objects.
Returns:
A 2-D tensor for labels/outputs.
diff --git a/tensorflow/contrib/training/python/training/bucket_ops.py b/tensorflow/contrib/training/python/training/bucket_ops.py
index 8323830cfd..3f397d2401 100644
--- a/tensorflow/contrib/training/python/training/bucket_ops.py
+++ b/tensorflow/contrib/training/python/training/bucket_ops.py
@@ -273,7 +273,7 @@ def bucket_by_sequence_length(input_length,
`which_bucket` for details of the other arguments.
Args:
- input_length: `int32` scalar `Output`, the sequence length of tensors.
+ input_length: `int32` scalar `Tensor`, the sequence length of tensors.
tensors: The list or dictionary of tensors, representing a single element,
to bucket. Nested lists are not supported.
batch_size: The new batch size pulled from the queue
@@ -303,7 +303,7 @@ def bucket_by_sequence_length(input_length,
Returns:
A tuple `(sequence_length, outputs)` where `sequence_length` is
- a 1-D `Output` of size `batch_size` and `outputs` is a list or dictionary
+ a 1-D `Tensor` of size `batch_size` and `outputs` is a list or dictionary
of batched, bucketed, outputs corresponding to elements of `tensors`.
Raises:
diff --git a/tensorflow/contrib/training/python/training/device_setter.py b/tensorflow/contrib/training/python/training/device_setter.py
index cd4b6580e0..ae6ffb8f28 100644
--- a/tensorflow/contrib/training/python/training/device_setter.py
+++ b/tensorflow/contrib/training/python/training/device_setter.py
@@ -77,7 +77,7 @@ def byte_size_load_fn(op):
"""Load function that computes the byte size of a single-output `Operation`.
This is intended to be used with `"Variable"` ops, which have a single
- `Output` output with the contents of the variable. However, it can also be
+ `Tensor` output with the contents of the variable. However, it can also be
used for calculating the size of any op that has a single output.
Intended to be used with `GreedyLoadBalancingStrategy`.
@@ -86,7 +86,7 @@ def byte_size_load_fn(op):
op: An `Operation` with a single output, typically a "Variable" op.
Returns:
- The number of bytes in the output `Output`.
+ The number of bytes in the output `Tensor`.
Raises:
ValueError: if `op` does not have a single output, or if the shape of the
diff --git a/tensorflow/contrib/training/python/training/sequence_queueing_state_saver.py b/tensorflow/contrib/training/python/training/sequence_queueing_state_saver.py
index 487d6b42df..4baece2e5d 100644
--- a/tensorflow/contrib/training/python/training/sequence_queueing_state_saver.py
+++ b/tensorflow/contrib/training/python/training/sequence_queueing_state_saver.py
@@ -134,15 +134,15 @@ def _check_rank(value, expected_rank):
Args:
value: A Tensor, possibly with shape associated shape information.
- expected_rank: int32 scalar (optionally an `Output`).
+ expected_rank: int32 scalar (optionally a `Tensor`).
Returns:
new_value: A Tensor matching `value`. Accessing this tensor tests
- assertions on its rank. If expected_rank is not an `Output`, then
+ assertions on its rank. If expected_rank is not a `Tensor`, then
new_value's shape's rank has been set.
Raises:
- ValueError: if `expected_rank` is not an `Output` and the rank of `value`
+ ValueError: if `expected_rank` is not a `Tensor` and the rank of `value`
is known and is not equal to `expected_rank`.
"""
assert isinstance(value, ops.Tensor)
@@ -173,15 +173,15 @@ def _check_shape(value, expected_shape):
Args:
value: A Tensor, possibly with shape associated shape information.
- expected_shape: a `TensorShape`, list of `int32`, or a vector `Output`.
+ expected_shape: a `TensorShape`, list of `int32`, or a vector `Tensor`.
Returns:
new_value: A Tensor matching `value`. Accessing this tensor tests
- assertions on its shape. If expected_shape is not an `Output`, then
+ assertions on its shape. If expected_shape is not a `Tensor`, then
new_value's shape has been set.
Raises:
- ValueError: if `expected_shape` is not an `Output` and the shape of `value`
+ ValueError: if `expected_shape` is not a `Tensor` and the shape of `value`
is known and is not equal to `expected_shape`.
"""
assert isinstance(value, ops.Tensor)
@@ -221,27 +221,27 @@ def _check_dimensions(value, dimensions, expected_sizes, debug_prefix):
value: A Tensor, with optional / partial shape associated shape information.
dimensions: An int list, the dimensions to check.
expected_sizes: list of mixed ints and int32 scalar tensors.
- Optionally also a vector `Output`.
+ Optionally also a vector `Tensor`.
debug_prefix: A string, used for naming ops and printing debugging messages.
Returns:
new_value: A Tensor matching `value`. Accessing this tensor tests
- assertions on its shape. If expected_sizes is not an `Output`, then
+ assertions on its shape. If expected_sizes is not a `Tensor`, then
new_value's shape has been set for all `dimensions[i]` where
- `expected_sizes[i]` is not an `Output`.
+ `expected_sizes[i]` is not a `Tensor`.
Raises:
TypeError: if any of the input contains invalid types:
- if `value` is not an `Output`.
+ if `value` is not a `Tensor`.
if `dimensions` is not a `list` or `tuple`.
ValueError: if input has incorrect sizes or inferred shapes do not match:
if `dimensions` contains repeated dimensions.
- if `expected_sizes` is not an `Output` and its length does not match that
+ if `expected_sizes` is not a `Tensor` and its length does not match that
`dimensions`.
if `value`'s shape has a well-defined rank, and one of the values in
`dimensions` is equal to or above this rank.
if `value`'s shape is well defined for some `dimensions[i]`, and
- `expected_sizes[i]` is not an `Output`, and these two values do
+ `expected_sizes[i]` is not a `Tensor`, and these two values do
not match.
"""
@@ -301,7 +301,7 @@ def _prepare_sequence_inputs(inputs, states):
Raises:
ValueError: if the shapes of inputs.context.values(), states.values(),
or inputs.sequences.values() are not fully defined (with the exception
- of the dimension of any `Output` in inputs.sequences.values()).
+ of the dimension of any `Tensor` in inputs.sequences.values()).
TypeError: if the dtype of length is not int32.
"""
# Convert state initial values to tensors
@@ -461,7 +461,7 @@ class NextQueuedSequenceBatch(object):
are assigned to each split.
Returns:
- An int32 vector `Output`.
+ An int32 vector `Tensor`.
"""
return self._state_saver._received_sequence
@@ -473,7 +473,7 @@ class NextQueuedSequenceBatch(object):
`padded_length / num_unroll`. This is the sequence_count.
Returns:
- An int32 vector `Output`.
+ An int32 vector `Tensor`.
"""
return self._state_saver._received_sequence_count
@@ -526,7 +526,7 @@ class NextQueuedSequenceBatch(object):
state_name: string, matches a key provided in `initial_states`.
Returns:
- An `Output`: a batched set of states, either initial states (if this is
+ A `Tensor`: a batched set of states, either initial states (if this is
the first run of the given example), or a value as stored during
a previous iteration via `save_state` control flow.
Its type is the same as `initial_states["state_name"].dtype`.
@@ -553,7 +553,7 @@ class NextQueuedSequenceBatch(object):
Args:
state_name: string, matches a key provided in `initial_states`.
- value: An `Output`.
+ value: A `Tensor`.
Its type must match that of `initial_states[state_name].dtype`.
If we had at input:
@@ -728,24 +728,24 @@ class SequenceQueueingStateSaver(object):
"""Creates the SequenceQueueingStateSaver.
Args:
- batch_size: int or int32 scalar `Output`, how large minibatches should
+ batch_size: int or int32 scalar `Tensor`, how large minibatches should
be when accessing the `state()` method and `context`, `sequences`, etc,
properties.
num_unroll: Python integer, how many time steps to unroll at a time.
The input sequences of length `k` are then split into `k / num_unroll`
many segments.
- input_length: An int32 scalar `Output`, the length of the sequence prior
+ input_length: An int32 scalar `Tensor`, the length of the sequence prior
to padding. This value may be at most `padded_length` for any given
input (see below for the definition of `padded_length`).
Batched and total lengths of the current iteration are made accessible
via the `length` and `total_length` properties. The shape of
input_length (scalar) must be fully specified.
- input_key: A string scalar `Output`, the **unique** key for the given
+ input_key: A string scalar `Tensor`, the **unique** key for the given
input. This is used to keep track of the split minibatch elements
of this input. Batched keys of the current iteration are made
accessible via the `key` property. The shape of `input_key` (scalar)
must be fully specified.
- input_sequences: A dict mapping string names to `Output` values. The
+ input_sequences: A dict mapping string names to `Tensor` values. The
values must all have matching first dimension, called `padded_length`.
The `SequenceQueueingStateSaver` will split these tensors along
this first dimension into minibatch elements of dimension
@@ -755,7 +755,7 @@ class SequenceQueueingStateSaver(object):
**Note**: `padded_length` may be dynamic, and may vary from input
to input, but must always be a multiple of `num_unroll`. The remainder
of the shape (other than the first dimension) must be fully specified.
- input_context: A dict mapping string names to `Output` values. The values
+ input_context: A dict mapping string names to `Tensor` values. The values
are treated as "global" across all time splits of the given input,
and will be copied across for all minibatch elements accordingly.
Batched and copied context of the current iteration are made
@@ -963,9 +963,9 @@ class SequenceQueueingStateSaver(object):
These dictionaries are used to keep track of indices into the barrier.
Args:
- sequences: `OrderedDict` of string, `Output` pairs.
- context: `OrderedDict` of string, `Output` pairs.
- states: `OrderedDict` of string, `Output` pairs.
+ sequences: `OrderedDict` of string, `Tensor` pairs.
+ context: `OrderedDict` of string, `Tensor` pairs.
+ states: `OrderedDict` of string, `Tensor` pairs.
"""
assert isinstance(sequences, dict)
assert isinstance(context, dict)
@@ -1305,12 +1305,12 @@ def batch_sequences_with_states(input_key, input_sequences, input_context,
```
Args:
- input_key: A string scalar `Output`, the **unique** key for the given
+ input_key: A string scalar `Tensor`, the **unique** key for the given
input example. This is used to keep track of the split minibatch elements
of this input. Batched keys of the current iteration are made
accessible via the `key` property. The shape of `input_key` (scalar) must
be fully specified.
- input_sequences: A dict mapping string names to `Output` values. The values
+ input_sequences: A dict mapping string names to `Tensor` values. The values
must all have matching first dimension, called `value_length`. They may
vary from input to input. The remainder of the shape (other than the first
dimension) must be fully specified.
@@ -1321,14 +1321,14 @@ def batch_sequences_with_states(input_key, input_sequences, input_context,
**Note**: if `pad=False`, then `value_length` must always be a multiple
of `num_unroll`.
- input_context: A dict mapping string names to `Output` values. The values
+ input_context: A dict mapping string names to `Tensor` values. The values
are treated as "global" across all time splits of the given input example,
and will be copied across for all minibatch elements accordingly.
Batched and copied context of the current iteration are made
accessible via the `context` property.
**Note**: All input_context values must have fully defined shapes.
- input_length: None or an int32 scalar `Output`, the length of the sequence
+ input_length: None or an int32 scalar `Tensor`, the length of the sequence
prior to padding. If `input_length=None` and `pad=True` then the length
will be inferred and will be equal to `value_length`. If `pad=False` then
`input_length` cannot be `None`: `input_length` must be specified. Its
@@ -1345,7 +1345,7 @@ def batch_sequences_with_states(input_key, input_sequences, input_context,
num_unroll: Python integer, how many time steps to unroll at a time.
The input sequences of length k are then split into k / num_unroll many
segments.
- batch_size: int or int32 scalar `Output`, how large minibatches should
+ batch_size: int or int32 scalar `Tensor`, how large minibatches should
be when accessing the `state()` method and `context`, `sequences`, etc,
properties.
num_threads: The int number of threads enqueuing input examples into a
@@ -1426,15 +1426,15 @@ def _padding(sequences, num_unroll):
"""For a dictionary of sequences, pads tensors to a multiple of `num_unroll`.
Args:
- sequences: dictionary with `Output` values.
+ sequences: dictionary with `Tensor` values.
num_unroll: int specifying to what multiple to pad sequences to.
Returns:
- length: Scalar `Output` of dimension 0 of all the values in sequences.
+ length: Scalar `Tensor` of dimension 0 of all the values in sequences.
padded_sequence: Dictionary of sequences that are padded to a multiple of
`num_unroll`.
Raises:
ValueError: If `num_unroll` not an int or sequences not a dictionary from
- string to `Output`.
+ string to `Tensor`.
"""
if not isinstance(num_unroll, numbers.Integral):
raise ValueError("Unsupported num_unroll expected int, got: %s" %
diff --git a/tensorflow/contrib/training/python/training/training.py b/tensorflow/contrib/training/python/training/training.py
index 9aaa79d920..e65ef6ba11 100644
--- a/tensorflow/contrib/training/python/training/training.py
+++ b/tensorflow/contrib/training/python/training/training.py
@@ -146,9 +146,9 @@ def create_train_op(total_loss,
"""Creates an `Operation` that evaluates the gradients and returns the loss.
Args:
- total_loss: An `Output` representing the total loss.
+ total_loss: A `Tensor` representing the total loss.
optimizer: A tf.Optimizer to use for computing the gradients.
- global_step: An `Output` representing the global step variable. If left as
+ global_step: A `Tensor` representing the global step variable. If left as
`None`, then slim.variables.global_step() is used.
update_ops: An optional list of updates to execute. If `update_ops` is
`None`, then the update ops are set to the contents of the
@@ -169,8 +169,8 @@ def create_train_op(total_loss,
with the ops that generated them.
Returns:
- An `Output` that when evaluated, computes the gradients and returns the
- total loss value.
+ A `Tensor` that when evaluated, computes the gradients and returns the total
+ loss value.
"""
if global_step is None:
global_step = variables.get_or_create_global_step()
@@ -244,7 +244,7 @@ def train(
"""Runs the training loop.
Args:
- train_op: An `Output` that, when executed, will apply the gradients and
+ train_op: A `Tensor` that, when executed, will apply the gradients and
return the loss value.
logdir: The directory where the graph and checkpoints are saved.
master: The URL of the master.