aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/g3doc/api_docs/python/control_flow_ops.md
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/g3doc/api_docs/python/control_flow_ops.md')
-rw-r--r--tensorflow/g3doc/api_docs/python/control_flow_ops.md157
1 files changed, 79 insertions, 78 deletions
diff --git a/tensorflow/g3doc/api_docs/python/control_flow_ops.md b/tensorflow/g3doc/api_docs/python/control_flow_ops.md
index 4d96984f59..f3245e6957 100644
--- a/tensorflow/g3doc/api_docs/python/control_flow_ops.md
+++ b/tensorflow/g3doc/api_docs/python/control_flow_ops.md
@@ -1,12 +1,13 @@
<!-- This file is machine generated: DO NOT EDIT! -->
-# Control Flow
+# Control Flow <a class="md-anchor" id="AUTOGENERATED-control-flow"></a>
Note: Functions taking `Tensor` arguments can also take anything
accepted by [`tf.convert_to_tensor`](framework.md#convert_to_tensor).
<!-- TOC-BEGIN This section is generated by neural network: DO NOT EDIT! -->
## Contents
+### [Control Flow](#AUTOGENERATED-control-flow)
* [Control Flow Operations](#AUTOGENERATED-control-flow-operations)
* [tf.identity(input, name=None)](#identity)
* [tf.tuple(tensors, name=None, control_inputs=None)](#tuple)
@@ -40,31 +41,31 @@ accepted by [`tf.convert_to_tensor`](framework.md#convert_to_tensor).
<!-- TOC-END This section was generated by neural network, THANKS FOR READING! -->
-## Control Flow Operations <div class="md-anchor" id="AUTOGENERATED-control-flow-operations">{#AUTOGENERATED-control-flow-operations}</div>
+## Control Flow Operations <a class="md-anchor" id="AUTOGENERATED-control-flow-operations"></a>
TensorFlow provides several operations and classes that you can use to control
the execution of operations and add conditional dependencies to your graph.
- - -
-### tf.identity(input, name=None) <div class="md-anchor" id="identity">{#identity}</div>
+### tf.identity(input, name=None) <a class="md-anchor" id="identity"></a>
Return a tensor with the same shape and contents as the input tensor or value.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>input</b>: A `Tensor`.
* <b>name</b>: A name for the operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
A `Tensor`. Has the same type as `input`.
- - -
-### tf.tuple(tensors, name=None, control_inputs=None) <div class="md-anchor" id="tuple">{#tuple}</div>
+### tf.tuple(tensors, name=None, control_inputs=None) <a class="md-anchor" id="tuple"></a>
Group tensors together.
@@ -82,18 +83,18 @@ are done.
See also `group` and `with_dependencies`.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>tensors</b>: A list of `Tensor`s or `IndexedSlices`, some entries can be `None`.
* <b>name</b>: (optional) A name to use as a `name_scope` for the operation.
* <b>control_inputs</b>: List of additional ops to finish before returning.
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
Same as `tensors`.
-##### Raises:
+##### Raises: <a class="md-anchor" id="AUTOGENERATED-raises-"></a>
* <b>ValueError</b>: If `tensors` does not contain any `Tensor` or `IndexedSlices`.
@@ -101,7 +102,7 @@ See also `group` and `with_dependencies`.
- - -
-### tf.group(*inputs, **kwargs) <div class="md-anchor" id="group">{#group}</div>
+### tf.group(*inputs, **kwargs) <a class="md-anchor" id="group"></a>
Create an op that groups multiple operations.
@@ -110,18 +111,18 @@ output.
See also `tuple` and `with_dependencies`.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>*inputs</b>: One or more tensors to group.
* <b>**kwargs</b>: Optional parameters to pass when constructing the NodeDef.
* <b>name</b>: A name for this operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
An Operation that executes all its inputs.
-##### Raises:
+##### Raises: <a class="md-anchor" id="AUTOGENERATED-raises-"></a>
* <b>ValueError</b>: If an unknown keyword argument is provided, or if there are
@@ -130,30 +131,30 @@ See also `tuple` and `with_dependencies`.
- - -
-### tf.no_op(name=None) <div class="md-anchor" id="no_op">{#no_op}</div>
+### tf.no_op(name=None) <a class="md-anchor" id="no_op"></a>
Does nothing. Only useful as a placeholder for control edges.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>name</b>: A name for the operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
The created Operation.
- - -
-### tf.count_up_to(ref, limit, name=None) <div class="md-anchor" id="count_up_to">{#count_up_to}</div>
+### tf.count_up_to(ref, limit, name=None) <a class="md-anchor" id="count_up_to"></a>
Increments 'ref' until it reaches 'limit'.
This operation outputs "ref" after the update is done. This makes it
easier to chain operations that need to use the updated value.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>ref</b>: A mutable `Tensor`. Must be one of the following types: `int32`, `int64`.
@@ -163,7 +164,7 @@ easier to chain operations that need to use the updated value.
'OutOfRange' error.
* <b>name</b>: A name for the operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
A `Tensor`. Has the same type as `ref`.
A copy of the input before increment. If nothing else modifies the
@@ -171,188 +172,188 @@ easier to chain operations that need to use the updated value.
-## Logical Operators <div class="md-anchor" id="AUTOGENERATED-logical-operators">{#AUTOGENERATED-logical-operators}</div>
+## Logical Operators <a class="md-anchor" id="AUTOGENERATED-logical-operators"></a>
TensorFlow provides several operations that you can use to add logical operators
to your graph.
- - -
-### tf.logical_and(x, y, name=None) <div class="md-anchor" id="logical_and">{#logical_and}</div>
+### tf.logical_and(x, y, name=None) <a class="md-anchor" id="logical_and"></a>
Returns the truth value of x AND y element-wise.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>x</b>: A `Tensor` of type `bool`.
* <b>y</b>: A `Tensor` of type `bool`.
* <b>name</b>: A name for the operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
A `Tensor` of type `bool`.
- - -
-### tf.logical_not(x, name=None) <div class="md-anchor" id="logical_not">{#logical_not}</div>
+### tf.logical_not(x, name=None) <a class="md-anchor" id="logical_not"></a>
Returns the truth value of NOT x element-wise.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>x</b>: A `Tensor` of type `bool`.
* <b>name</b>: A name for the operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
A `Tensor` of type `bool`.
- - -
-### tf.logical_or(x, y, name=None) <div class="md-anchor" id="logical_or">{#logical_or}</div>
+### tf.logical_or(x, y, name=None) <a class="md-anchor" id="logical_or"></a>
Returns the truth value of x OR y element-wise.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>x</b>: A `Tensor` of type `bool`.
* <b>y</b>: A `Tensor` of type `bool`.
* <b>name</b>: A name for the operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
A `Tensor` of type `bool`.
- - -
-### tf.logical_xor(x, y, name='LogicalXor') <div class="md-anchor" id="logical_xor">{#logical_xor}</div>
+### tf.logical_xor(x, y, name='LogicalXor') <a class="md-anchor" id="logical_xor"></a>
x ^ y = (x | y) & ~(x & y).
-## Comparison Operators <div class="md-anchor" id="AUTOGENERATED-comparison-operators">{#AUTOGENERATED-comparison-operators}</div>
+## Comparison Operators <a class="md-anchor" id="AUTOGENERATED-comparison-operators"></a>
TensorFlow provides several operations that you can use to add comparison
operators to your graph.
- - -
-### tf.equal(x, y, name=None) <div class="md-anchor" id="equal">{#equal}</div>
+### tf.equal(x, y, name=None) <a class="md-anchor" id="equal"></a>
Returns the truth value of (x == y) element-wise.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>x</b>: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `int64`, `complex64`, `quint8`, `qint8`, `qint32`.
* <b>y</b>: A `Tensor`. Must have the same type as `x`.
* <b>name</b>: A name for the operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
A `Tensor` of type `bool`.
- - -
-### tf.not_equal(x, y, name=None) <div class="md-anchor" id="not_equal">{#not_equal}</div>
+### tf.not_equal(x, y, name=None) <a class="md-anchor" id="not_equal"></a>
Returns the truth value of (x != y) element-wise.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>x</b>: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `int64`, `complex64`, `quint8`, `qint8`, `qint32`.
* <b>y</b>: A `Tensor`. Must have the same type as `x`.
* <b>name</b>: A name for the operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
A `Tensor` of type `bool`.
- - -
-### tf.less(x, y, name=None) <div class="md-anchor" id="less">{#less}</div>
+### tf.less(x, y, name=None) <a class="md-anchor" id="less"></a>
Returns the truth value of (x < y) element-wise.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>x</b>: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `int64`.
* <b>y</b>: A `Tensor`. Must have the same type as `x`.
* <b>name</b>: A name for the operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
A `Tensor` of type `bool`.
- - -
-### tf.less_equal(x, y, name=None) <div class="md-anchor" id="less_equal">{#less_equal}</div>
+### tf.less_equal(x, y, name=None) <a class="md-anchor" id="less_equal"></a>
Returns the truth value of (x <= y) element-wise.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>x</b>: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `int64`.
* <b>y</b>: A `Tensor`. Must have the same type as `x`.
* <b>name</b>: A name for the operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
A `Tensor` of type `bool`.
- - -
-### tf.greater(x, y, name=None) <div class="md-anchor" id="greater">{#greater}</div>
+### tf.greater(x, y, name=None) <a class="md-anchor" id="greater"></a>
Returns the truth value of (x > y) element-wise.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>x</b>: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `int64`.
* <b>y</b>: A `Tensor`. Must have the same type as `x`.
* <b>name</b>: A name for the operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
A `Tensor` of type `bool`.
- - -
-### tf.greater_equal(x, y, name=None) <div class="md-anchor" id="greater_equal">{#greater_equal}</div>
+### tf.greater_equal(x, y, name=None) <a class="md-anchor" id="greater_equal"></a>
Returns the truth value of (x >= y) element-wise.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>x</b>: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `int64`.
* <b>y</b>: A `Tensor`. Must have the same type as `x`.
* <b>name</b>: A name for the operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
A `Tensor` of type `bool`.
- - -
-### tf.select(condition, t, e, name=None) <div class="md-anchor" id="select">{#select}</div>
+### tf.select(condition, t, e, name=None) <a class="md-anchor" id="select"></a>
Selects elements from `t` or `e`, depending on `condition`.
@@ -375,7 +376,7 @@ select(condition, t, e) ==> [[1, 2],
[1, 2]]
```
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>condition</b>: A `Tensor` of type `bool`.
@@ -383,14 +384,14 @@ select(condition, t, e) ==> [[1, 2],
* <b>e</b>: A `Tensor` with the same type and shape as `t`.
* <b>name</b>: A name for the operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
A `Tensor` with the same type and shape as `t` and `e`.
- - -
-### tf.where(input, name=None) <div class="md-anchor" id="where">{#where}</div>
+### tf.where(input, name=None) <a class="md-anchor" id="where"></a>
Returns locations of true values in a boolean tensor.
@@ -426,116 +427,116 @@ where(input) ==> [[0, 0, 0],
[2, 1, 1]]
```
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>input</b>: A `Tensor` of type `bool`.
* <b>name</b>: A name for the operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
A `Tensor` of type `int64`.
-## Debugging Operations <div class="md-anchor" id="AUTOGENERATED-debugging-operations">{#AUTOGENERATED-debugging-operations}</div>
+## Debugging Operations <a class="md-anchor" id="AUTOGENERATED-debugging-operations"></a>
TensorFlow provides several operations that you can use to validate values and
debug your graph.
- - -
-### tf.is_finite(x, name=None) <div class="md-anchor" id="is_finite">{#is_finite}</div>
+### tf.is_finite(x, name=None) <a class="md-anchor" id="is_finite"></a>
Returns which elements of x are finite.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>x</b>: A `Tensor`. Must be one of the following types: `float32`, `float64`.
* <b>name</b>: A name for the operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
A `Tensor` of type `bool`.
- - -
-### tf.is_inf(x, name=None) <div class="md-anchor" id="is_inf">{#is_inf}</div>
+### tf.is_inf(x, name=None) <a class="md-anchor" id="is_inf"></a>
Returns which elements of x are Inf.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>x</b>: A `Tensor`. Must be one of the following types: `float32`, `float64`.
* <b>name</b>: A name for the operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
A `Tensor` of type `bool`.
- - -
-### tf.is_nan(x, name=None) <div class="md-anchor" id="is_nan">{#is_nan}</div>
+### tf.is_nan(x, name=None) <a class="md-anchor" id="is_nan"></a>
Returns which elements of x are NaN.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>x</b>: A `Tensor`. Must be one of the following types: `float32`, `float64`.
* <b>name</b>: A name for the operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
A `Tensor` of type `bool`.
- - -
-### tf.verify_tensor_all_finite(t, msg, name=None) <div class="md-anchor" id="verify_tensor_all_finite">{#verify_tensor_all_finite}</div>
+### tf.verify_tensor_all_finite(t, msg, name=None) <a class="md-anchor" id="verify_tensor_all_finite"></a>
Assert that the tensor does not contain any NaN's or Inf's.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>t</b>: Tensor to check.
* <b>msg</b>: Message to log on failure.
* <b>name</b>: A name for this operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
Same tensor as `t`.
- - -
-### tf.check_numerics(tensor, message, name=None) <div class="md-anchor" id="check_numerics">{#check_numerics}</div>
+### tf.check_numerics(tensor, message, name=None) <a class="md-anchor" id="check_numerics"></a>
Checks a tensor for NaN and Inf values.
When run, reports an `InvalidArgument` error if `tensor` has any values
that are not a number (NaN) or infinity (Inf). Otherwise, passes `tensor` as-is.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>tensor</b>: A `Tensor`. Must be one of the following types: `float32`, `float64`.
* <b>message</b>: A `string`. Prefix of the error message.
* <b>name</b>: A name for the operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
A `Tensor`. Has the same type as `tensor`.
- - -
-### tf.add_check_numerics_ops() <div class="md-anchor" id="add_check_numerics_ops">{#add_check_numerics_ops}</div>
+### tf.add_check_numerics_ops() <a class="md-anchor" id="add_check_numerics_ops"></a>
Connect a check_numerics to every floating point tensor.
@@ -544,21 +545,21 @@ tensor in the graph. For all ops in the graph, the `check_numerics` op for
all of its (`float` or `double`) inputs is guaranteed to run before the
`check_numerics` op on any of its outputs.
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
A `group` op depending on all `check_numerics` ops added.
- - -
-### tf.Assert(condition, data, summarize=None, name=None) <div class="md-anchor" id="Assert">{#Assert}</div>
+### tf.Assert(condition, data, summarize=None, name=None) <a class="md-anchor" id="Assert"></a>
Asserts that the given condition is true.
If `condition` evaluates to false, print the list of tensors in `data`.
`summarize` determines how many entries of the tensors to print.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>condition</b>: The condition to evaluate.
@@ -569,14 +570,14 @@ If `condition` evaluates to false, print the list of tensors in `data`.
- - -
-### tf.Print(input_, data, message=None, first_n=None, summarize=None, name=None) <div class="md-anchor" id="Print">{#Print}</div>
+### tf.Print(input_, data, message=None, first_n=None, summarize=None, name=None) <a class="md-anchor" id="Print"></a>
Prints a list of tensors.
This is an identity op with the side effect of printing `data` when
evaluating.
-##### Args:
+##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
* <b>input_</b>: A tensor passed through this op.
@@ -587,7 +588,7 @@ evaluating.
* <b>summarize</b>: Only print this many entries of each tensor.
* <b>name</b>: A name for the operation (optional).
-##### Returns:
+##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
Same tensor as `input_`.