提交 b2dc60ea 编写于 作者: M Manjunath Kudlur

TensorFlow: Upstream changes to git.

Changes:
- Documentation updates.
- Relax numpy requirement to 1.9.2

Base CL: 107349632
上级 1d3874fe
......@@ -626,7 +626,7 @@ REGISTER_OP("SegmentSum")
.Doc(R"doc(
Computes the sum along segments of a tensor.
Read [the section on Segmentation](../python/math_ops.md#segmentation)
Read [the section on Segmentation](../../api_docs/python/math_ops.md#segmentation)
for an explanation of segments.
Computes a tensor such that
......@@ -653,8 +653,9 @@ REGISTER_OP("SegmentMean")
.Doc(R"doc(
Computes the mean along segments of a tensor.
Read [the section on Segmentation](../python/math_ops.md#segmentation)
for an explanation of segments.
Read [the section on
Segmentation](../../api_docs/python/math_ops.md#segmentation) for an explanation
of segments.
Computes a tensor such that
\\(output_i = \frac{\sum_j data_j}{N}\\) where `mean` is
......@@ -681,8 +682,9 @@ REGISTER_OP("SegmentProd")
.Doc(R"doc(
Computes the product along segments of a tensor.
Read [the section on Segmentation](../python/math_ops.md#segmentation)
for an explanation of segments.
Read [the section on
Segmentation](../../api_docs/python/math_ops.md#segmentation) for an explanation
of segments.
Computes a tensor such that
\\(output_i = \prod_j data_j\\) where the product is over `j` such
......@@ -708,8 +710,9 @@ REGISTER_OP("SegmentMin")
.Doc(R"doc(
Computes the minimum along segments of a tensor.
Read [the section on Segmentation](../python/math_ops.md#segmentation)
for an explanation of segments.
Read [the section on
Segmentation](../../api_docs/python/math_ops.md#segmentation) for an explanation
of segments.
Computes a tensor such that
\\(output_i = \min_j(data_j)\\) where `min` is over `j` such
......@@ -735,7 +738,7 @@ REGISTER_OP("SegmentMax")
.Doc(R"doc(
Computes the maximum along segments of a tensor.
Read [the section on Segmentation](../python/math_ops.md#segmentation)
Read [the section on Segmentation](../../api_docs/python/math_ops.md#segmentation)
for an explanation of segments.
Computes a tensor such that
......@@ -763,8 +766,9 @@ REGISTER_OP("UnsortedSegmentSum")
.Doc(R"doc(
Computes the sum along segments of a tensor.
Read [the section on Segmentation](../python/math_ops.md#segmentation)
for an explanation of segments.
Read [the section on
Segmentation](../../api_docs/python/math_ops.md#segmentation) for an explanation
of segments.
Computes a tensor such that
\\(output_i = \sum_j data_j\\) where sum is over `j` such
......@@ -797,8 +801,9 @@ REGISTER_OP("SparseSegmentSum")
.Doc(R"doc(
Computes the sum along sparse segments of a tensor.
Read [the section on Segmentation](../python/math_ops.md#segmentation)
for an explanation of segments.
Read [the section on
Segmentation](../../api_docs/python/math_ops.md#segmentation) for an explanation
of segments.
Like `SegmentSum`, but `segment_ids` can have rank less than `data`'s first
dimension, selecting a subset of dimension_0, specified by `indices`.
......@@ -843,8 +848,9 @@ REGISTER_OP("SparseSegmentMean")
.Doc(R"doc(
Computes the mean along sparse segments of a tensor.
Read [the section on Segmentation](../python/math_ops.md#segmentation)
for an explanation of segments.
Read [the section on
Segmentation](../../api_docs/python/math_ops.md#segmentation) for an explanation
of segments.
Like `SegmentMean`, but `segment_ids` can have rank less than `data`'s first
dimension, selecting a subset of dimension_0, specified by `indices`.
......
......@@ -3,8 +3,8 @@
TensorFlow's public C++ API includes only the API for executing graphs, as of
version 0.5. To control the execution of a graph from C++:
1. Build the computation graph using the [Python API](../python/).
1. Use [tf.train.write_graph()](../python/train.md#write_graph) to
1. Build the computation graph using the [Python API](../../api_docs/python/).
1. Use [tf.train.write_graph()](../../api_docs/python/train.md#write_graph) to
write the graph to a file.
1. Load the graph using the C++ Session API. For example:
......
......@@ -2,8 +2,8 @@
# Tensor Transformations <a class="md-anchor" id="AUTOGENERATED-tensor-transformations"></a>
Note: Functions taking `Tensor` arguments can also take anything
accepted by [`tf.convert_to_tensor`](framework.md#convert_to_tensor).
Note: Functions taking `Tensor` arguments can also take anything accepted by
[`tf.convert_to_tensor`](../../api_docs/python/framework.md#convert_to_tensor).
<!-- TOC-BEGIN This section is generated by neural network: DO NOT EDIT! -->
## Contents
......
......@@ -61,8 +61,8 @@ print sess.run(c)
```
A session may own resources, such as
[variables](state_ops.md#Variable), [queues](io_ops.md#QueueBase),
and [readers](io_ops.md#ReaderBase). It is important to release
[variables](../../api_docs/python/state_ops.md#Variable), [queues](../../api_docs/python/io_ops.md#QueueBase),
and [readers](../../api_docs/python/io_ops.md#ReaderBase). It is important to release
these resources when they are no longer required. To do this, either
invoke the [`close()`](#Session.close) method on the session, or use
the session as a context manager. The following two examples are
......@@ -134,30 +134,31 @@ graph element, and these determine the return value of this
method. A graph element can be one of the following types:
* If the *i*th element of `fetches` is an
[`Operation`](framework.md#Operation), the *i*th return value
will be `None`.
[`Operation`](../../api_docs/python/framework.md#Operation), the *i*th
return value will be `None`.
* If the *i*th element of `fetches` is a
[`Tensor`](framework.md#Tensor), the *i*th return value will
be a numpy ndarray containing the value of that tensor.
[`Tensor`](../../api_docs/python/framework.md#Tensor), the *i*th return
value will be a numpy ndarray containing the value of that tensor.
* If the *i*th element of `fetches` is a
[`SparseTensor`](sparse_ops.md#SparseTensor), the *i*th
return value will be a
[`SparseTensorValue`](sparse_ops.md#SparseTensorValue)
[`SparseTensor`](../../api_docs/python/sparse_ops.md#SparseTensor),
the *i*th return value will be a
[`SparseTensorValue`](../../api_docs/python/sparse_ops.md#SparseTensorValue)
containing the value of that sparse tensor.
The optional `feed_dict` argument allows the caller to override
the value of tensors in the graph. Each key in `feed_dict` can be
one of the following types:
* If the key is a [`Tensor`](framework.md#Tensor), the
* If the key is a [`Tensor`](../../api_docs/python/framework.md#Tensor), the
value may be a Python scalar, string, list, or numpy ndarray
that can be converted to the same `dtype` as that
tensor. Additionally, if the key is a
[placeholder](io_ops.md#placeholder), the shape of the value
will be checked for compatibility with the placeholder.
* If the key is a [`SparseTensor`](sparse_ops.md#SparseTensor),
[placeholder](../../api_docs/python/io_ops.md#placeholder), the shape of
the value will be checked for compatibility with the placeholder.
* If the key is a
[`SparseTensor`](../../api_docs/python/sparse_ops.md#SparseTensor),
the value should be a
[`SparseTensorValue`](sparse_ops.md#SparseTensorValue).
[`SparseTensorValue`](../../api_docs/python/sparse_ops.md#SparseTensorValue).
##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
......@@ -211,9 +212,9 @@ The graph that was launched in this session.
Returns a context manager that makes this object the default session.
Use with the `with` keyword to specify that calls to
[`Operation.run()`](framework.md#Operation.run) or
[`Tensor.run()`](framework.md#Tensor.run) should be executed in
this session.
[`Operation.run()`](../../api_docs/python/framework.md#Operation.run) or
[`Tensor.run()`](../../api_docs/python/framework.md#Tensor.run) should be
executed in this session.
```python
c = tf.constant(..)
......@@ -267,9 +268,9 @@ A TensorFlow `Session` for use in interactive contexts, such as a shell.
The only difference with a regular `Session` is that an `InteractiveSession`
installs itself as the default session on construction.
The methods [`Tensor.eval()`](framework.md#Tensor.eval) and
[`Operation.run()`](framework.md#Operation.run) will use that session
to run ops.
The methods [`Tensor.eval()`](../../api_docs/python/framework.md#Tensor.eval)
and [`Operation.run()`](../../api_docs/python/framework.md#Operation.run)
will use that session to run ops.
This is convenient in interactive shells and [IPython
notebooks](http://ipython.org), as it avoids having to pass an explicit
......@@ -371,7 +372,7 @@ The operation that failed, if known.
*N.B.* If the failed op was synthesized at runtime, e.g. a `Send`
or `Recv` op, there will be no corresponding
[`Operation`](framework.md#Operation) object. In that case, this
[`Operation`](../../api_docs/python/framework.md#Operation) object. In that case, this
will return `None`, and you should instead use the
[`OpError.node_def`](#OpError.node_def) to discover information about the
op.
......@@ -423,11 +424,12 @@ The error message that describes the error.
Raised when an operation or step is cancelled.
For example, a long-running operation (e.g.
[`queue.enqueue()`](io_ops.md#QueueBase.enqueue) may be cancelled by
running another operation (e.g.
[`queue.close(cancel_pending_enqueues=True)`](io_ops.md#QueueBase.close),
or by [closing the session](client.md#Session.close). A step that is
running such a long-running operation will fail by raising `CancelledError`.
[`queue.enqueue()`](../../api_docs/python/io_ops.md#QueueBase.enqueue) may be
cancelled by running another operation (e.g.
[`queue.close(cancel_pending_enqueues=True)`](../../api_docs/python/io_ops.md#QueueBase.close),
or by [closing the session](../../api_docs/python/client.md#Session.close).
A step that is running such a long-running operation will fail by raising
`CancelledError`.
- - -
......@@ -465,10 +467,10 @@ Raised when an operation receives an invalid argument.
This may occur, for example, if an operation is receives an input
tensor that has an invalid value or shape. For example, the
[`tf.matmul()`](math_ops.md#matmul) op will raise this error if it
receives an input that is not a matrix, and the
[`tf.reshape()`](array_ops.md#reshape) op will raise this error if
the new shape does not match the number of elements in the input
[`tf.matmul()`](../../api_docs/python/math_ops.md#matmul) op will raise this
error if it receives an input that is not a matrix, and the
[`tf.reshape()`](../../api_docs/python/array_ops.md#reshape) op will raise
this error if the new shape does not match the number of elements in the input
tensor.
- - -
......@@ -502,8 +504,8 @@ Creates a `DeadlineExceededError`.
Raised when a requested entity (e.g., a file or directory) was not found.
For example, running the
[`tf.WholeFileReader.read()`](io_ops.md#WholeFileReader) operation
could raise `NotFoundError` if it receives the name of a file that
[`tf.WholeFileReader.read()`](../../api_docs/python/io_ops.md#WholeFileReader)
operation could raise `NotFoundError` if it receives the name of a file that
does not exist.
- - -
......@@ -521,8 +523,8 @@ Creates a `NotFoundError`.
Raised when an entity that we attempted to create already exists.
For example, running an operation that saves a file
(e.g. [`tf.train.Saver.save()`](train.md#Saver.save)) could
potentially raise this exception if an explicit filename for an
(e.g. [`tf.train.Saver.save()`](../../api_docs/python/train.md#Saver.save))
could potentially raise this exception if an explicit filename for an
existing file was passed.
- - -
......@@ -540,8 +542,8 @@ Creates an `AlreadyExistsError`.
Raised when the caller does not have permission to run an operation.
For example, running the
[`tf.WholeFileReader.read()`](io_ops.md#WholeFileReader) operation
could raise `PermissionDeniedError` if it receives the name of a
[`tf.WholeFileReader.read()`](../../api_docs/python/io_ops.md#WholeFileReader)
operation could raise `PermissionDeniedError` if it receives the name of a
file for which the user does not have the read file permission.
- - -
......@@ -592,8 +594,8 @@ Creates a `ResourceExhaustedError`.
Operation was rejected because the system is not in a state to execute it.
This exception is most commonly raised when running an operation
that reads a [`tf.Variable`](state_ops.md#Variable) before it has
been initialized.
that reads a [`tf.Variable`](../../api_docs/python/state_ops.md#Variable)
before it has been initialized.
- - -
......@@ -609,9 +611,11 @@ Creates a `FailedPreconditionError`.
The operation was aborted, typically due to a concurrent action.
For example, running a [`queue.enqueue()`](io_ops.md#QueueBase.enqueue)
For example, running a
[`queue.enqueue()`](../../api_docs/python/io_ops.md#QueueBase.enqueue)
operation may raise `AbortedError` if a
[`queue.close()`](io_ops.md#QueueBase.close) operation previously ran.
[`queue.close()`](../../api_docs/python/io_ops.md#QueueBase.close) operation
previously ran.
- - -
......@@ -628,9 +632,10 @@ Creates an `AbortedError`.
Raised when an operation executed past the valid range.
This exception is raised in "end-of-file" conditions, such as when a
[`queue.dequeue()`](io_ops.md#QueueBase.dequeue) operation is
blocked on an empty queue, and a
[`queue.close()`](io_ops.md#QueueBase.close) operation executes.
[`queue.dequeue()`](../../api_docs/python/io_ops.md#QueueBase.dequeue)
operation is blocked on an empty queue, and a
[`queue.close()`](../../api_docs/python/io_ops.md#QueueBase.close)
operation executes.
- - -
......@@ -648,9 +653,9 @@ Raised when an operation has not been implemented.
Some operations may raise this error when passed otherwise-valid
arguments that it does not currently support. For example, running
the [`tf.nn.max_pool()`](nn.md#max_pool) operation would raise this
error if pooling was requested on the batch dimension, because this
is not yet supported.
the [`tf.nn.max_pool()`](../../api_docs/python/nn.md#max_pool) operation
would raise this error if pooling was requested on the batch dimension,
because this is not yet supported.
- - -
......@@ -700,8 +705,8 @@ Creates an `UnavailableError`.
Raised when unrecoverable data loss or corruption is encountered.
For example, this may be raised by running a
[`tf.WholeFileReader.read()`](io_ops.md#WholeFileReader) operation,
if the file is truncated while it is being read.
[`tf.WholeFileReader.read()`](../../api_docs/python/io_ops.md#WholeFileReader)
operation, if the file is truncated while it is being read.
- - -
......
......@@ -2,8 +2,8 @@
# Constants, Sequences, and Random Values <a class="md-anchor" id="AUTOGENERATED-constants--sequences--and-random-values"></a>
Note: Functions taking `Tensor` arguments can also take anything
accepted by [`tf.convert_to_tensor`](framework.md#convert_to_tensor).
Note: Functions taking `Tensor` arguments can also take anything accepted by
[`tf.convert_to_tensor`](../../api_docs/python/framework.md#convert_to_tensor).
<!-- TOC-BEGIN This section is generated by neural network: DO NOT EDIT! -->
## Contents
......@@ -313,11 +313,13 @@ time they are evaluated.
The `seed` keyword argument in these functions acts in conjunction with
the graph-level random seed. Changing either the graph-level seed using
[`set_random_seed`](constant_op.md#set_random_seed) or the op-level seed
will change the underlying seed of these operations. Setting neither graph-level
nor op-level seed, results in a random seed for all operations.
See [`set_random_seed`](constant_op.md#set_random_seed) for details on the
interaction between operation-level and graph-level random seeds.
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed) or the
op-level seed will change the underlying seed of these operations. Setting
neither graph-level nor op-level seed, results in a random seed for all
operations.
See [`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for details on the interaction between operation-level and graph-level random
seeds.
### Examples: <a class="md-anchor" id="AUTOGENERATED-examples-"></a>
......@@ -373,7 +375,9 @@ Outputs random values from a normal distribution.
of the normal distribution.
* <b>dtype</b>: The type of the output.
* <b>seed</b>: A Python integer. Used to create a random seed for the distribution.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
* <b>name</b>: A name for the operation (optional).
##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
......@@ -401,7 +405,9 @@ deviations from the mean are dropped and re-picked.
of the truncated normal distribution.
* <b>dtype</b>: The type of the output.
* <b>seed</b>: A Python integer. Used to create a random seed for the distribution.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
* <b>name</b>: A name for the operation (optional).
##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
......@@ -429,7 +435,9 @@ the upper bound `maxval` is excluded.
the range of random values to generate.
* <b>dtype</b>: The type of the output.
* <b>seed</b>: A Python integer. Used to create a random seed for the distribution.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
* <b>name</b>: A name for the operation (optional).
##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
......@@ -458,7 +466,9 @@ to one and only one `output[i]`. For example, a mapping that might occur for a
* <b>value</b>: A Tensor to be shuffled.
* <b>seed</b>: A Python integer. Used to create a random seed for the distribution.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
* <b>name</b>: A name for the operation (optional).
##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
......
......@@ -2,8 +2,8 @@
# 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).
Note: Functions taking `Tensor` arguments can also take anything accepted by
[`tf.convert_to_tensor`](../../api_docs/python/framework.md#convert_to_tensor).
<!-- TOC-BEGIN This section is generated by neural network: DO NOT EDIT! -->
## Contents
......
......@@ -44,14 +44,16 @@ Classes and functions for building TensorFlow graphs.
A TensorFlow computation, represented as a dataflow graph.
A `Graph` contains a set of [`Operation`](framework.md#Operation) objects,
which represent units of computation; and [`Tensor`](framework.md#Tensor)
objects, which represent the units of data that flow between operations.
A `Graph` contains a set of
[`Operation`](../../api_docs/python/framework.md#Operation) objects,
which represent units of computation; and
[`Tensor`](../../api_docs/python/framework.md#Tensor) objects, which represent
the units of data that flow between operations.
A default `Graph` is always registered, and accessible by calling
[`tf.get_default_graph()`](framework.md#get_default_graph). To add an
operation to the default graph, simply call one of the functions that defines
a new `Operation`:
[`tf.get_default_graph()`](../../api_docs/python/framework.md#get_default_graph).
To add an operation to the default graph, simply call one of the functions
that defines a new `Operation`:
```
c = tf.constant(4.0)
......@@ -59,7 +61,7 @@ assert c.graph is tf.get_default_graph()
```
Another typical usage involves the
[`Graph.as_default()`](framework.md#Graph.as_default)
[`Graph.as_default()`](../../api_docs/python/framework.md#Graph.as_default)
context manager, which overrides the current default graph for the
lifetime of the context:
......@@ -129,7 +131,7 @@ Returns a serialized `GraphDef` representation of this graph.
The serialized `GraphDef` can be imported into another `Graph`
(using [`import_graph_def()`](#import_graph_def)) or used with the
[C++ Session API](../cc/index.md).
[C++ Session API](../../api_docs/cc/index.md).
This method is thread-safe.
......@@ -155,7 +157,7 @@ Finalizes this graph, making it read-only.
After calling `g.finalize()`, no new operations can be added to
`g`. This method is used to ensure that no operations are added
to a graph when it is shared between multiple threads, for example
when using a [`QueueRunner`](train.md#QueueRunner).
when using a [`QueueRunner`](../../api_docs/python/train.md#QueueRunner).
- - -
......@@ -373,9 +375,9 @@ A `Graph` instance supports an arbitrary number of "collections"
that are identified by name. For convenience when building a large
graph, collections can store groups of related objects: for
example, the `tf.Variable` uses a collection (named
[`tf.GraphKeys.VARIABLES`](framework.md#GraphKeys)) for all variables that are
created during the construction of a graph. The caller may define
additional collections by specifying a new name.
[`tf.GraphKeys.VARIABLES`](../../api_docs/python/framework.md#GraphKeys)) for
all variables that are created during the construction of a graph. The caller
may define additional collections by specifying a new name.
- - -
......@@ -662,15 +664,17 @@ Represents a graph node that performs computation on tensors.
An `Operation` is a node in a TensorFlow `Graph` that takes zero or
more `Tensor` objects as input, and produces zero or more `Tensor`
objects as output. Objects of type `Operation` are created by
calling a Python op constructor (such as [`tf.matmul()`](math_ops.md#matmul))
or [`Graph.create_op()`](framework.md#Graph.create_op).
calling a Python op constructor (such as
[`tf.matmul()`](../../api_docs/python/math_ops.md#matmul))
or [`Graph.create_op()`](../../api_docs/python/framework.md#Graph.create_op).
For example `c = tf.matmul(a, b)` creates an `Operation` of type
"MatMul" that takes tensors `a` and `b` as input, and produces `c`
as output.
After the graph has been launched in a session, an `Operation` can
be executed by passing it to [`Session.run()`](client.md#Session.run).
be executed by passing it to
[`Session.run()`](../../api_docs/python/client.md#Session.run).
`op.run()` is a shortcut for calling `tf.get_default_session().run(op)`.
- - -
......@@ -748,8 +752,8 @@ available, or `session` must be specified explicitly.
* <b>feed_dict</b>: A dictionary that maps `Tensor` objects to feed values.
See [`Session.run()`](client.md#Session.run) for a description of the
valid feed values.
See [`Session.run()`](../../api_docs/python/client.md#Session.run)
for a description of the valid feed values.
* <b>session</b>: (Optional.) The `Session` to be used to run to this operation. If
none, the default session will be used.
......@@ -872,7 +876,7 @@ Represents a value produced by an `Operation`.
A `Tensor` is a symbolic handle to one of the outputs of an
`Operation`. It does not hold the values of that operation's output,
but instead provides a means of computing those values in a
TensorFlow [`Session`](client.md#Session).
TensorFlow [`Session`](../../api_docs/python/client.md#Session).
This class has two primary purposes:
......@@ -883,7 +887,7 @@ This class has two primary purposes:
2. After the graph has been launched in a session, the value of the
`Tensor` can be computed by passing it to
[`Session.run()`](client.md#Session.run).
[`Session.run()`](../../api_docs/python/client.md#Session.run).
`t.eval()` is a shortcut for calling
`tf.get_default_session().run(t)`.
......@@ -964,8 +968,8 @@ available, or `session` must be specified explicitly.
* <b>feed_dict</b>: A dictionary that maps `Tensor` objects to feed values.
See [`Session.run()`](client.md#Session.run) for a description of
the valid feed values.
See [`Session.run()`](../../api_docs/python/client.md#Session.run) for a
description of the valid feed values.
* <b>session</b>: (Optional.) The `Session` to be used to evaluate this tensor. If
none, the default session will be used.
......@@ -983,8 +987,8 @@ Returns the `TensorShape` that represents the shape of this tensor.
The shape is computed using shape inference functions that are
registered for each `Operation` type using `tf.RegisterShape`.
See [`TensorShape`](framework.md#TensorShape) for more details of what a shape
represents.
See [`TensorShape`](../../api_docs/python/framework.md#TensorShape) for more
details of what a shape represents.
The inferred shape of a tensor is used to provide shape
information without having to launch the graph in a session. This
......@@ -1279,7 +1283,9 @@ Converts the given `type_value` to a `DType`.
Wrapper for `Graph.device()` using the default graph.
See [`Graph.name_scope()`](framework.md#Graph.name_scope) for more details.
See
[`Graph.name_scope()`](../../api_docs/python/framework.md#Graph.name_scope)
for more details.
##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
......@@ -1299,7 +1305,9 @@ See [`Graph.name_scope()`](framework.md#Graph.name_scope) for more details.
Wrapper for `Graph.name_scope()` using the default graph.
See [`Graph.name_scope()`](framework.md#Graph.name_scope) for more details.
See
[`Graph.name_scope()`](../../api_docs/python/framework.md#Graph.name_scope)
for more details.
##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
......@@ -1318,7 +1326,7 @@ See [`Graph.name_scope()`](framework.md#Graph.name_scope) for more details.
Wrapper for `Graph.control_dependencies()` using the default graph.
See [`Graph.control_dependencies()`](framework.md#Graph.control_dependencies)
See [`Graph.control_dependencies()`](../../api_docs/python/framework.md#Graph.control_dependencies)
for more details.
##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
......@@ -1458,7 +1466,7 @@ protocol buffer, and extract individual objects in the `GraphDef` as
Wrapper for `Graph.add_to_collection()` using the default graph.
See [`Graph.add_to_collection()`](framework.md#Graph.add_to_collection)
See [`Graph.add_to_collection()`](../../api_docs/python/framework.md#Graph.add_to_collection)
for more details.
##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
......@@ -1475,7 +1483,7 @@ for more details.
Wrapper for `Graph.get_collection()` using the default graph.
See [`Graph.get_collection()`](framework.md#Graph.get_collection)
See [`Graph.get_collection()`](../../api_docs/python/framework.md#Graph.get_collection)
for more details.
##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
......@@ -1511,17 +1519,20 @@ The following standard keys are defined:
* `VARIABLES`: the `Variable` objects that comprise a model, and
must be saved and restored together. See
[`tf.all_variables()`](state_ops.md#all_variables) for more details.
[`tf.all_variables()`](../../api_docs/python/state_ops.md#all_variables)
for more details.
* `TRAINABLE_VARIABLES`: the subset of `Variable` objects that will
be trained by an optimizer. See
[`tf.trainable_variables()`](state_ops.md#trainable_variables)
[`tf.trainable_variables()`](../../api_docs/python/state_ops.md#trainable_variables)
for more details.
* `SUMMARIES`: the summary `Tensor` objects that have been created
in the graph. See [`tf.merge_all_summaries()`](train.md#merge_all_summaries)
* `SUMMARIES`: the summary `Tensor` objects that have been created in the
graph. See
[`tf.merge_all_summaries()`](../../api_docs/python/train.md#merge_all_summaries)
for more details.
* `QUEUE_RUNNERS`: the `QueueRunner` objects that are used to
produce input for a computation. See
[`tf.start_queue_runners()`](train.md#start_queue_runners) for more details.
[`tf.start_queue_runners()`](../../api_docs/python/train.md#start_queue_runners)
for more details.
## Defining new operations <a class="md-anchor" id="AUTOGENERATED-defining-new-operations"></a>
......@@ -1643,10 +1654,10 @@ A `TensorShape` represents a possibly-partial shape specification for a
If a tensor is produced by an operation of type `"Foo"`, its shape
may be inferred if there is a registered shape function for
`"Foo"`. See [`tf.RegisterShape()`](framework.md#RegisterShape)
`"Foo"`. See [`tf.RegisterShape()`](../../api_docs/python/framework.md#RegisterShape)
for details of shape
functions and how to register them. Alternatively, the shape may be set
explicitly using [`Tensor.set_shape()`](framework.md#Tensor.set_shape).
explicitly using [`Tensor.set_shape()`](../../api_docs/python/framework.md#Tensor.set_shape).
- - -
......@@ -2068,7 +2079,7 @@ internally use the two seeds to allow user to change the seed globally for a
graph, or for only specific operations.
For details on how the graph-level seed interacts with op seeds, see
[`set_random_seed`](constant_op.md#set_random_seed).
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed).
##### Args: <a class="md-anchor" id="AUTOGENERATED-args-"></a>
......
......@@ -2,8 +2,8 @@
# Images <a class="md-anchor" id="AUTOGENERATED-images"></a>
Note: Functions taking `Tensor` arguments can also take anything
accepted by [`tf.convert_to_tensor`](framework.md#convert_to_tensor).
Note: Functions taking `Tensor` arguments can also take anything accepted by
[`tf.convert_to_tensor`](../../api_docs/python/framework.md#convert_to_tensor).
<!-- TOC-BEGIN This section is generated by neural network: DO NOT EDIT! -->
## Contents
......@@ -497,8 +497,9 @@ fully contains the result.
* <b>image</b>: 3-D tensor of shape `[height, width, channels]`
* <b>size</b>: 1-D tensor with two elements, specifying target `[height, width]`
* <b>seed</b>: A Python integer. Used to create a random seed.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
* <b>seed</b>: A Python integer. Used to create a random seed. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
* <b>name</b>: A name for this operation (optional).
##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
......@@ -601,8 +602,9 @@ dimension, which is `height`. Otherwise output the image as-is.
* <b>image</b>: A 3-D tensor of shape `[height, width, channels].`
* <b>seed</b>: A Python integer. Used to create a random seed.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
* <b>seed</b>: A Python integer. Used to create a random seed. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
......@@ -654,8 +656,9 @@ second dimension, which is `width`. Otherwise output the image as-is.
* <b>image</b>: A 3-D tensor of shape `[height, width, channels].`
* <b>seed</b>: A Python integer. Used to create a random seed.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
* <b>seed</b>: A Python integer. Used to create a random seed. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
......@@ -744,8 +747,9 @@ have modifications in the range `[-max_delta,max_delta]`.
* <b>image</b>: 3-D tensor of shape `[height, width, channels]`.
* <b>max_delta</b>: float, must be non-negative.
* <b>seed</b>: A Python integer. Used to create a random seed.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
* <b>seed</b>: A Python integer. Used to create a random seed. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
......@@ -814,8 +818,9 @@ picked in the interval `[lower, upper]`.
* <b>image</b>: 3-D tensor of shape `[height, width, channels]`.
* <b>lower</b>: float. Lower bound for the random contrast factor.
* <b>upper</b>: float. Upper bound for the random contrast factor.
* <b>seed</b>: A Python integer. Used to create a random seed.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
* <b>seed</b>: A Python integer. Used to create a random seed. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
......
......@@ -2,8 +2,8 @@
# Inputs and Readers <a class="md-anchor" id="AUTOGENERATED-inputs-and-readers"></a>
Note: Functions taking `Tensor` arguments can also take anything
accepted by [`tf.convert_to_tensor`](framework.md#convert_to_tensor).
Note: Functions taking `Tensor` arguments can also take anything accepted by
[`tf.convert_to_tensor`](../../api_docs/python/framework.md#convert_to_tensor).
<!-- TOC-BEGIN This section is generated by neural network: DO NOT EDIT! -->
## Contents
......@@ -1591,8 +1591,9 @@ queue has been closed.
the number of tensors in each queue element.
* <b>shapes</b>: (Optional.) A list of fully-defined `TensorShape` objects,
with the same length as `dtypes` or `None`.
* <b>seed</b>: A Python integer. Used to create a random seed.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
* <b>seed</b>: A Python integer. Used to create a random seed. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
* <b>shared_name</b>: (Optional.) If non-empty, this queue will be shared under
the given name across multiple sessions.
* <b>name</b>: Optional name for the queue operation.
......
......@@ -2,8 +2,8 @@
# Math <a class="md-anchor" id="AUTOGENERATED-math"></a>
Note: Functions taking `Tensor` arguments can also take anything
accepted by [`tf.convert_to_tensor`](framework.md#convert_to_tensor).
Note: Functions taking `Tensor` arguments can also take anything accepted by
[`tf.convert_to_tensor`](../../api_docs/python/framework.md#convert_to_tensor).
<!-- TOC-BEGIN This section is generated by neural network: DO NOT EDIT! -->
## Contents
......@@ -1322,7 +1322,7 @@ tf.segment_sum(c, tf.constant([0, 0, 1]))
Computes the sum along segments of a tensor.
Read [the section on Segmentation](../python/math_ops.md#segmentation)
Read [the section on Segmentation](../../api_docs/python/math_ops.md#segmentation)
for an explanation of segments.
Computes a tensor such that
......@@ -1355,8 +1355,9 @@ that `segment_ids[j] == i`.
Computes the product along segments of a tensor.
Read [the section on Segmentation](../python/math_ops.md#segmentation)
for an explanation of segments.
Read [the section on
Segmentation](../../api_docs/python/math_ops.md#segmentation) for an explanation
of segments.
Computes a tensor such that
\\(output_i = \prod_j data_j\\) where the product is over `j` such
......@@ -1388,8 +1389,9 @@ that `segment_ids[j] == i`.
Computes the minimum along segments of a tensor.
Read [the section on Segmentation](../python/math_ops.md#segmentation)
for an explanation of segments.
Read [the section on
Segmentation](../../api_docs/python/math_ops.md#segmentation) for an explanation
of segments.
Computes a tensor such that
\\(output_i = \min_j(data_j)\\) where `min` is over `j` such
......@@ -1421,7 +1423,7 @@ that `segment_ids[j] == i`.
Computes the maximum along segments of a tensor.
Read [the section on Segmentation](../python/math_ops.md#segmentation)
Read [the section on Segmentation](../../api_docs/python/math_ops.md#segmentation)
for an explanation of segments.
Computes a tensor such that
......@@ -1454,8 +1456,9 @@ that `segment_ids[j] == i`.
Computes the mean along segments of a tensor.
Read [the section on Segmentation](../python/math_ops.md#segmentation)
for an explanation of segments.
Read [the section on
Segmentation](../../api_docs/python/math_ops.md#segmentation) for an explanation
of segments.
Computes a tensor such that
\\(output_i = \frac{\sum_j data_j}{N}\\) where `mean` is
......@@ -1489,8 +1492,9 @@ values summed.
Computes the sum along segments of a tensor.
Read [the section on Segmentation](../python/math_ops.md#segmentation)
for an explanation of segments.
Read [the section on
Segmentation](../../api_docs/python/math_ops.md#segmentation) for an explanation
of segments.
Computes a tensor such that
\\(output_i = \sum_j data_j\\) where sum is over `j` such
......@@ -1530,8 +1534,9 @@ If the sum is empty for a given segment ID `i`, `output[i] = 0`.
Computes the sum along sparse segments of a tensor.
Read [the section on Segmentation](../python/math_ops.md#segmentation)
for an explanation of segments.
Read [the section on
Segmentation](../../api_docs/python/math_ops.md#segmentation) for an explanation
of segments.
Like `SegmentSum`, but `segment_ids` can have rank less than `data`'s first
dimension, selecting a subset of dimension_0, specified by `indices`.
......@@ -1582,8 +1587,9 @@ tf.segment_sum(c, tf.constant([0, 0, 1]))
Computes the mean along sparse segments of a tensor.
Read [the section on Segmentation](../python/math_ops.md#segmentation)
for an explanation of segments.
Read [the section on
Segmentation](../../api_docs/python/math_ops.md#segmentation) for an explanation
of segments.
Like `SegmentMean`, but `segment_ids` can have rank less than `data`'s first
dimension, selecting a subset of dimension_0, specified by `indices`.
......
......@@ -2,8 +2,8 @@
# Neural Network <a class="md-anchor" id="AUTOGENERATED-neural-network"></a>
Note: Functions taking `Tensor` arguments can also take anything
accepted by [`tf.convert_to_tensor`](framework.md#convert_to_tensor).
Note: Functions taking `Tensor` arguments can also take anything accepted by
[`tf.convert_to_tensor`](../../api_docs/python/framework.md#convert_to_tensor).
<!-- TOC-BEGIN This section is generated by neural network: DO NOT EDIT! -->
## Contents
......@@ -142,8 +142,9 @@ kept independently and each row and column will be kept or not kept together.
* <b>keep_prob</b>: A Python float. The probability that each element is kept.
* <b>noise_shape</b>: A 1-D `Tensor` of type `int32`, representing the
shape for randomly generated keep/drop flags.
* <b>seed</b>: A Python integer. Used to create a random seed.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
* <b>seed</b>: A Python integer. Used to create random seeds. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
* <b>name</b>: A name for this operation (optional).
##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
......@@ -734,8 +735,8 @@ Looks up `ids` in a list of embedding tensors.
This function is used to perform parallel lookups on the list of
tensors in `params`. It is a generalization of
[`tf.gather()`](array_ops.md#gather), where `params` is interpreted
as a partition of a larger embedding tensor.
[`tf.gather()`](../../api_docs/python/array_ops.md#gather), where `params` is
interpreted as a partition of a larger embedding tensor.
If `len(params) > 1`, each element `id` of `ids` is partitioned between
the elements of `params` by computing `p = id % len(params)`, and is
......
......@@ -2,8 +2,8 @@
# Sparse Tensors <a class="md-anchor" id="AUTOGENERATED-sparse-tensors"></a>
Note: Functions taking `Tensor` arguments can also take anything
accepted by [`tf.convert_to_tensor`](framework.md#convert_to_tensor).
Note: Functions taking `Tensor` arguments can also take anything accepted by
[`tf.convert_to_tensor`](../../api_docs/python/framework.md#convert_to_tensor).
<!-- TOC-BEGIN This section is generated by neural network: DO NOT EDIT! -->
## Contents
......
......@@ -2,8 +2,8 @@
# Variables <a class="md-anchor" id="AUTOGENERATED-variables"></a>
Note: Functions taking `Tensor` arguments can also take anything
accepted by [`tf.convert_to_tensor`](framework.md#convert_to_tensor).
Note: Functions taking `Tensor` arguments can also take anything accepted by
[`tf.convert_to_tensor`](../../api_docs/python/framework.md#convert_to_tensor).
<!-- TOC-BEGIN This section is generated by neural network: DO NOT EDIT! -->
## Contents
......@@ -330,7 +330,7 @@ This is not a graph construction method, it does not add ops to the graph.
This convenience method requires a session where the graph containing this
variable has been launched. If no session is passed, the default session is
used. See the [Session class](client.md#Session) for more information on
used. See the [Session class](../../api_docs/python/client.md#Session) for more information on
launching a graph and on sessions.
```python
......@@ -1008,8 +1008,9 @@ Returns an initializer that generates Tensors with a normal distribution.
to generate.
* <b>stddev</b>: a python scalar or a scalar tensor. Standard deviation of the
random values to generate.
* <b>seed</b>: A Python integer. Used to create random seeds.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
* <b>seed</b>: A Python integer. Used to create random seeds. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
......@@ -1034,8 +1035,9 @@ neural network weights and filters.
to generate.
* <b>stddev</b>: a python scalar or a scalar tensor. Standard deviation of the
random values to generate.
* <b>seed</b>: A Python integer. Used to create random seeds.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
* <b>seed</b>: A Python integer. Used to create random seeds. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
......@@ -1056,8 +1058,9 @@ Returns an initializer that generates Tensors with a uniform distribution.
of random values to generate.
* <b>maxval</b>: a python scalar or a scalar tensor. upper bound of the range
of random values to generate.
* <b>seed</b>: A Python integer. Used to create random seeds.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
* <b>seed</b>: A Python integer. Used to create random seeds. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
......@@ -1089,8 +1092,9 @@ numerically computed: for a linear layer it's 1.0, relu: ~1.43, tanh: ~1.15.
* <b>factor</b>: Float. A multiplicative factor by which the values will be scaled.
* <b>seed</b>: A Python integer. Used to create random seeds.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
* <b>seed</b>: A Python integer. Used to create random seeds. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
##### Returns: <a class="md-anchor" id="AUTOGENERATED-returns-"></a>
......@@ -1113,7 +1117,8 @@ useful for training embedding models and similar lookup-based networks, since
only a small subset of embedding vectors change in any given step.
Since a sparse update of a large tensor may be generated automatically during
gradient computation (as in the gradient of [`tf.gather`](array_ops.md#gather)),
gradient computation (as in the gradient of
[`tf.gather`](../../api_docs/python/array_ops.md#gather)),
an [`IndexedSlices`](#IndexedSlices) class is provided that encapsulates a set
of sparse indices and values. `IndexedSlices` objects are detected and handled
automatically by the optimizers in most cases.
......@@ -1328,10 +1333,10 @@ dense[slices.indices[i], :, :, :, ...] = slices.values[i, :, :, :, ...]
The `IndexedSlices` class is used principally in the definition of
gradients for operations that have sparse gradients
(e.g. [`tf.gather`](array_ops.md#gather)).
(e.g. [`tf.gather`](../../api_docs/python/array_ops.md#gather)).
Contrast this representation with
[`SparseTensor`](sparse_ops.md#SparseTensor),
[`SparseTensor`](../../api_docs/python/sparse_ops.md#SparseTensor),
which uses multi-dimensional indices and scalar values.
- - -
......
......@@ -950,8 +950,8 @@ There are two ways to use the moving averages for evaluations:
for a given variable.
* Build a model normally but load the checkpoint files to evaluate by using
the shadow variable names. For this use the `average_name()` method. See
the [Saver class](train.md#Saver) for more information on restoring saved
variables.
the [Saver class](../../api_docs/python/train.md#Saver) for more
information on restoring saved variables.
Example of restoring the shadow variable values:
......@@ -1407,8 +1407,8 @@ The following ops output
protocol buffers as serialized string tensors.
You can fetch the output of a summary op in a session, and pass it to
a [SummaryWriter](train.md#SummaryWriter) to append it to an event
file. Event files contain
a [SummaryWriter](../../api_docs/python/train.md#SummaryWriter) to append it
to an event file. Event files contain
[`Event`](https://tensorflow.googlesource.com/tensorflow/+/master/tensorflow/core/util/event.proto)
protos that can contain `Summary` protos along with the timestamp and
step. You can then use TensorBoard to visualize the contents of the
......
......@@ -8,10 +8,7 @@ your TensorFlow graph, plot quantitative metrics about the execution of your
graph, and show additional data like images that pass through it. When
TensorBoard is fully configured, it looks like this:
![MNIST TensorBoard](./mnist_tensorboard.png "MNIST TensorBoard") If you're on
desktop Chrome or Firefox, try playing around with [this live
TensorBoard](/tensorboard/cifar.html).
![MNIST TensorBoard](./mnist_tensorboard.png "MNIST TensorBoard")
## Serializing the data <a class="md-anchor" id="AUTOGENERATED-serializing-the-data"></a>
......
......@@ -199,7 +199,6 @@ loss and all these weight decay terms, as returned by the `loss()` function.
We visualize it in TensorBoard with a [scalar_summary](../../api_docs/python/train.md#scalar_summary):
![CIFAR-10 Loss](./cifar_loss.png "CIFAR-10 Total Loss")
###### [View this TensorBoard live! (Chrome/FF)](/tensorboard/cifar.html) <a class="md-anchor" id="AUTOGENERATED--view-this-tensorboard-live---chrome-ff----tensorboard-cifar.html-"></a>
We train the model using standard
[gradient descent](https://en.wikipedia.org/wiki/Gradient_descent)
......@@ -209,7 +208,6 @@ with a learning rate that
over time.
![CIFAR-10 Learning Rate Decay](./cifar_lr_decay.png "CIFAR-10 Learning Rate Decay")
###### [View this TensorBoard live! (Chrome/FF)](/tensorboard/cifar.html) <a class="md-anchor" id="AUTOGENERATED--view-this-tensorboard-live---chrome-ff----tensorboard-cifar.html-"></a>
The `train()` function adds the operations needed to minimize the objective by
calculating the gradient and updating the learned variables (see
......@@ -459,6 +457,3 @@ components to build address your image classification problem.
[Street View House Numbers (SVHN)](http://ufldl.stanford.edu/housenumbers/) data set.
Fork the CIFAR-10 tutorial and swap in the SVHN as the input data. Try adapting
the network architecture to improve predictive performance.
......@@ -132,9 +132,9 @@ class BaseSession(SessionInterface):
"""Returns a context manager that makes this object the default session.
Use with the `with` keyword to specify that calls to
[`Operation.run()`](framework.md#Operation.run) or
[`Tensor.run()`](framework.md#Tensor.run) should be executed in
this session.
[`Operation.run()`](../../api_docs/python/framework.md#Operation.run) or
[`Tensor.run()`](../../api_docs/python/framework.md#Tensor.run) should be
executed in this session.
```python
c = tf.constant(..)
......@@ -219,30 +219,31 @@ class BaseSession(SessionInterface):
method. A graph element can be one of the following types:
* If the *i*th element of `fetches` is an
[`Operation`](framework.md#Operation), the *i*th return value
will be `None`.
[`Operation`](../../api_docs/python/framework.md#Operation), the *i*th
return value will be `None`.
* If the *i*th element of `fetches` is a
[`Tensor`](framework.md#Tensor), the *i*th return value will
be a numpy ndarray containing the value of that tensor.
[`Tensor`](../../api_docs/python/framework.md#Tensor), the *i*th return
value will be a numpy ndarray containing the value of that tensor.
* If the *i*th element of `fetches` is a
[`SparseTensor`](sparse_ops.md#SparseTensor), the *i*th
return value will be a
[`SparseTensorValue`](sparse_ops.md#SparseTensorValue)
[`SparseTensor`](../../api_docs/python/sparse_ops.md#SparseTensor),
the *i*th return value will be a
[`SparseTensorValue`](../../api_docs/python/sparse_ops.md#SparseTensorValue)
containing the value of that sparse tensor.
The optional `feed_dict` argument allows the caller to override
the value of tensors in the graph. Each key in `feed_dict` can be
one of the following types:
* If the key is a [`Tensor`](framework.md#Tensor), the
* If the key is a [`Tensor`](../../api_docs/python/framework.md#Tensor), the
value may be a Python scalar, string, list, or numpy ndarray
that can be converted to the same `dtype` as that
tensor. Additionally, if the key is a
[placeholder](io_ops.md#placeholder), the shape of the value
will be checked for compatibility with the placeholder.
* If the key is a [`SparseTensor`](sparse_ops.md#SparseTensor),
[placeholder](../../api_docs/python/io_ops.md#placeholder), the shape of
the value will be checked for compatibility with the placeholder.
* If the key is a
[`SparseTensor`](../../api_docs/python/sparse_ops.md#SparseTensor),
the value should be a
[`SparseTensorValue`](sparse_ops.md#SparseTensorValue).
[`SparseTensorValue`](../../api_docs/python/sparse_ops.md#SparseTensorValue).
Args:
fetches: A single graph element, or a list of graph elements
......@@ -441,8 +442,8 @@ class Session(BaseSession):
```
A session may own resources, such as
[variables](state_ops.md#Variable), [queues](io_ops.md#QueueBase),
and [readers](io_ops.md#ReaderBase). It is important to release
[variables](../../api_docs/python/state_ops.md#Variable), [queues](../../api_docs/python/io_ops.md#QueueBase),
and [readers](../../api_docs/python/io_ops.md#ReaderBase). It is important to release
these resources when they are no longer required. To do this, either
invoke the [`close()`](#Session.close) method on the session, or use
the session as a context manager. The following two examples are
......@@ -526,9 +527,9 @@ class InteractiveSession(BaseSession):
The only difference with a regular `Session` is that an `InteractiveSession`
installs itself as the default session on construction.
The methods [`Tensor.eval()`](framework.md#Tensor.eval) and
[`Operation.run()`](framework.md#Operation.run) will use that session
to run ops.
The methods [`Tensor.eval()`](../../api_docs/python/framework.md#Tensor.eval)
and [`Operation.run()`](../../api_docs/python/framework.md#Operation.run)
will use that session to run ops.
This is convenient in interactive shells and [IPython
notebooks](http://ipython.org), as it avoids having to pass an explicit
......
......@@ -41,7 +41,7 @@ class OpError(Exception):
*N.B.* If the failed op was synthesized at runtime, e.g. a `Send`
or `Recv` op, there will be no corresponding
[`Operation`](framework.md#Operation) object. In that case, this
[`Operation`](../../api_docs/python/framework.md#Operation) object. In that case, this
will return `None`, and you should instead use the
[`OpError.node_def`](#OpError.node_def) to discover information about the
op.
......@@ -129,11 +129,12 @@ class CancelledError(OpError):
"""Raised when an operation or step is cancelled.
For example, a long-running operation (e.g.
[`queue.enqueue()`](io_ops.md#QueueBase.enqueue) may be cancelled by
running another operation (e.g.
[`queue.close(cancel_pending_enqueues=True)`](io_ops.md#QueueBase.close),
or by [closing the session](client.md#Session.close). A step that is
running such a long-running operation will fail by raising `CancelledError`.
[`queue.enqueue()`](../../api_docs/python/io_ops.md#QueueBase.enqueue) may be
cancelled by running another operation (e.g.
[`queue.close(cancel_pending_enqueues=True)`](../../api_docs/python/io_ops.md#QueueBase.close),
or by [closing the session](../../api_docs/python/client.md#Session.close).
A step that is running such a long-running operation will fail by raising
`CancelledError`.
@@__init__
"""
......@@ -165,10 +166,10 @@ class InvalidArgumentError(OpError):
This may occur, for example, if an operation is receives an input
tensor that has an invalid value or shape. For example, the
[`tf.matmul()`](math_ops.md#matmul) op will raise this error if it
receives an input that is not a matrix, and the
[`tf.reshape()`](array_ops.md#reshape) op will raise this error if
the new shape does not match the number of elements in the input
[`tf.matmul()`](../../api_docs/python/math_ops.md#matmul) op will raise this
error if it receives an input that is not a matrix, and the
[`tf.reshape()`](../../api_docs/python/array_ops.md#reshape) op will raise
this error if the new shape does not match the number of elements in the input
tensor.
@@__init__
......@@ -198,8 +199,8 @@ class NotFoundError(OpError):
"""Raised when a requested entity (e.g., a file or directory) was not found.
For example, running the
[`tf.WholeFileReader.read()`](io_ops.md#WholeFileReader) operation
could raise `NotFoundError` if it receives the name of a file that
[`tf.WholeFileReader.read()`](../../api_docs/python/io_ops.md#WholeFileReader)
operation could raise `NotFoundError` if it receives the name of a file that
does not exist.
@@__init__
......@@ -214,8 +215,8 @@ class AlreadyExistsError(OpError):
"""Raised when an entity that we attempted to create already exists.
For example, running an operation that saves a file
(e.g. [`tf.train.Saver.save()`](train.md#Saver.save)) could
potentially raise this exception if an explicit filename for an
(e.g. [`tf.train.Saver.save()`](../../api_docs/python/train.md#Saver.save))
could potentially raise this exception if an explicit filename for an
existing file was passed.
@@__init__
......@@ -231,8 +232,8 @@ class PermissionDeniedError(OpError):
"""Raised when the caller does not have permission to run an operation.
For example, running the
[`tf.WholeFileReader.read()`](io_ops.md#WholeFileReader) operation
could raise `PermissionDeniedError` if it receives the name of a
[`tf.WholeFileReader.read()`](../../api_docs/python/io_ops.md#WholeFileReader)
operation could raise `PermissionDeniedError` if it receives the name of a
file for which the user does not have the read file permission.
@@__init__
......@@ -277,8 +278,8 @@ class FailedPreconditionError(OpError):
"""Operation was rejected because the system is not in a state to execute it.
This exception is most commonly raised when running an operation
that reads a [`tf.Variable`](state_ops.md#Variable) before it has
been initialized.
that reads a [`tf.Variable`](../../api_docs/python/state_ops.md#Variable)
before it has been initialized.
@@__init__
"""
......@@ -292,9 +293,11 @@ class FailedPreconditionError(OpError):
class AbortedError(OpError):
"""The operation was aborted, typically due to a concurrent action.
For example, running a [`queue.enqueue()`](io_ops.md#QueueBase.enqueue)
For example, running a
[`queue.enqueue()`](../../api_docs/python/io_ops.md#QueueBase.enqueue)
operation may raise `AbortedError` if a
[`queue.close()`](io_ops.md#QueueBase.close) operation previously ran.
[`queue.close()`](../../api_docs/python/io_ops.md#QueueBase.close) operation
previously ran.
@@__init__
"""
......@@ -308,9 +311,10 @@ class OutOfRangeError(OpError):
"""Raised when an operation executed past the valid range.
This exception is raised in "end-of-file" conditions, such as when a
[`queue.dequeue()`](io_ops.md#QueueBase.dequeue) operation is
blocked on an empty queue, and a
[`queue.close()`](io_ops.md#QueueBase.close) operation executes.
[`queue.dequeue()`](../../api_docs/python/io_ops.md#QueueBase.dequeue)
operation is blocked on an empty queue, and a
[`queue.close()`](../../api_docs/python/io_ops.md#QueueBase.close)
operation executes.
@@__init__
"""
......@@ -326,9 +330,9 @@ class UnimplementedError(OpError):
Some operations may raise this error when passed otherwise-valid
arguments that it does not currently support. For example, running
the [`tf.nn.max_pool()`](nn.md#max_pool) operation would raise this
error if pooling was requested on the batch dimension, because this
is not yet supported.
the [`tf.nn.max_pool()`](../../api_docs/python/nn.md#max_pool) operation
would raise this error if pooling was requested on the batch dimension,
because this is not yet supported.
@@__init__
"""
......@@ -371,8 +375,8 @@ class DataLossError(OpError):
"""Raised when unrecoverable data loss or corruption is encountered.
For example, this may be raised by running a
[`tf.WholeFileReader.read()`](io_ops.md#WholeFileReader) operation,
if the file is truncated while it is being read.
[`tf.WholeFileReader.read()`](../../api_docs/python/io_ops.md#WholeFileReader)
operation, if the file is truncated while it is being read.
@@__init__
"""
......
......@@ -18,9 +18,11 @@ tf.flags.DEFINE_boolean("print_hidden_regex", False,
FLAGS = tf.flags.FLAGS
# TODO(josh11b,wicke): Remove the ../../api_docs/python/ once the
# website can handle it.
PREFIX_TEXT = """
Note: Functions taking `Tensor` arguments can also take anything
accepted by [`tf.convert_to_tensor`](framework.md#convert_to_tensor).
Note: Functions taking `Tensor` arguments can also take anything accepted by
[`tf.convert_to_tensor`](../../api_docs/python/framework.md#convert_to_tensor).
"""
......
......@@ -79,7 +79,7 @@ class Tensor(object):
A `Tensor` is a symbolic handle to one of the outputs of an
`Operation`. It does not hold the values of that operation's output,
but instead provides a means of computing those values in a
TensorFlow [`Session`](client.md#Session).
TensorFlow [`Session`](../../api_docs/python/client.md#Session).
This class has two primary purposes:
......@@ -90,7 +90,7 @@ class Tensor(object):
2. After the graph has been launched in a session, the value of the
`Tensor` can be computed by passing it to
[`Session.run()`](client.md#Session.run).
[`Session.run()`](../../api_docs/python/client.md#Session.run).
`t.eval()` is a shortcut for calling
`tf.get_default_session().run(t)`.
......@@ -204,8 +204,8 @@ class Tensor(object):
The shape is computed using shape inference functions that are
registered for each `Operation` type using `tf.RegisterShape`.
See [`TensorShape`](framework.md#TensorShape) for more details of what a shape
represents.
See [`TensorShape`](../../api_docs/python/framework.md#TensorShape) for more
details of what a shape represents.
The inferred shape of a tensor is used to provide shape
information without having to launch the graph in a session. This
......@@ -393,8 +393,8 @@ class Tensor(object):
Args:
feed_dict: A dictionary that maps `Tensor` objects to feed values.
See [`Session.run()`](client.md#Session.run) for a description of
the valid feed values.
See [`Session.run()`](../../api_docs/python/client.md#Session.run) for a
description of the valid feed values.
session: (Optional.) The `Session` to be used to evaluate this tensor. If
none, the default session will be used.
......@@ -614,10 +614,10 @@ class IndexedSlices(object):
The `IndexedSlices` class is used principally in the definition of
gradients for operations that have sparse gradients
(e.g. [`tf.gather`](array_ops.md#gather)).
(e.g. [`tf.gather`](../../api_docs/python/array_ops.md#gather)).
Contrast this representation with
[`SparseTensor`](sparse_ops.md#SparseTensor),
[`SparseTensor`](../../api_docs/python/sparse_ops.md#SparseTensor),
which uses multi-dimensional indices and scalar values.
@@__init__
......@@ -869,15 +869,17 @@ class Operation(object):
An `Operation` is a node in a TensorFlow `Graph` that takes zero or
more `Tensor` objects as input, and produces zero or more `Tensor`
objects as output. Objects of type `Operation` are created by
calling a Python op constructor (such as [`tf.matmul()`](math_ops.md#matmul))
or [`Graph.create_op()`](framework.md#Graph.create_op).
calling a Python op constructor (such as
[`tf.matmul()`](../../api_docs/python/math_ops.md#matmul))
or [`Graph.create_op()`](../../api_docs/python/framework.md#Graph.create_op).
For example `c = tf.matmul(a, b)` creates an `Operation` of type
"MatMul" that takes tensors `a` and `b` as input, and produces `c`
as output.
After the graph has been launched in a session, an `Operation` can
be executed by passing it to [`Session.run()`](client.md#Session.run).
be executed by passing it to
[`Session.run()`](../../api_docs/python/client.md#Session.run).
`op.run()` is a shortcut for calling `tf.get_default_session().run(op)`.
@@name
......@@ -1257,8 +1259,8 @@ class Operation(object):
Args:
feed_dict: A dictionary that maps `Tensor` objects to feed values.
See [`Session.run()`](client.md#Session.run) for a description of the
valid feed values.
See [`Session.run()`](../../api_docs/python/client.md#Session.run)
for a description of the valid feed values.
session: (Optional.) The `Session` to be used to run to this operation. If
none, the default session will be used.
"""
......@@ -1424,14 +1426,16 @@ def set_shapes_for_outputs(op):
class Graph(object):
"""A TensorFlow computation, represented as a dataflow graph.
A `Graph` contains a set of [`Operation`](framework.md#Operation) objects,
which represent units of computation; and [`Tensor`](framework.md#Tensor)
objects, which represent the units of data that flow between operations.
A `Graph` contains a set of
[`Operation`](../../api_docs/python/framework.md#Operation) objects,
which represent units of computation; and
[`Tensor`](../../api_docs/python/framework.md#Tensor) objects, which represent
the units of data that flow between operations.
A default `Graph` is always registered, and accessible by calling
[`tf.get_default_graph()`](framework.md#get_default_graph). To add an
operation to the default graph, simply call one of the functions that defines
a new `Operation`:
[`tf.get_default_graph()`](../../api_docs/python/framework.md#get_default_graph).
To add an operation to the default graph, simply call one of the functions
that defines a new `Operation`:
```
c = tf.constant(4.0)
......@@ -1439,7 +1443,7 @@ class Graph(object):
```
Another typical usage involves the
[`Graph.as_default()`](framework.md#Graph.as_default)
[`Graph.as_default()`](../../api_docs/python/framework.md#Graph.as_default)
context manager, which overrides the current default graph for the
lifetime of the context:
......@@ -1470,9 +1474,9 @@ class Graph(object):
that are identified by name. For convenience when building a large
graph, collections can store groups of related objects: for
example, the `tf.Variable` uses a collection (named
[`tf.GraphKeys.VARIABLES`](framework.md#GraphKeys)) for all variables that are
created during the construction of a graph. The caller may define
additional collections by specifying a new name.
[`tf.GraphKeys.VARIABLES`](../../api_docs/python/framework.md#GraphKeys)) for
all variables that are created during the construction of a graph. The caller
may define additional collections by specifying a new name.
@@add_to_collection
@@get_collection
......@@ -1581,7 +1585,7 @@ class Graph(object):
After calling `g.finalize()`, no new operations can be added to
`g`. This method is used to ensure that no operations are added
to a graph when it is shared between multiple threads, for example
when using a [`QueueRunner`](train.md#QueueRunner).
when using a [`QueueRunner`](../../api_docs/python/train.md#QueueRunner).
"""
self._finalized = True
......@@ -1606,7 +1610,7 @@ class Graph(object):
The serialized `GraphDef` can be imported into another `Graph`
(using [`import_graph_def()`](#import_graph_def)) or used with the
[C++ Session API](../cc/index.md).
[C++ Session API](../../api_docs/cc/index.md).
This method is thread-safe.
......@@ -2532,7 +2536,9 @@ class Graph(object):
def device(dev):
"""Wrapper for `Graph.device()` using the default graph.
See [`Graph.name_scope()`](framework.md#Graph.name_scope) for more details.
See
[`Graph.name_scope()`](../../api_docs/python/framework.md#Graph.name_scope)
for more details.
Args:
device_name_or_function: The device name or function to use in
......@@ -2548,7 +2554,9 @@ def device(dev):
def name_scope(name):
"""Wrapper for `Graph.name_scope()` using the default graph.
See [`Graph.name_scope()`](framework.md#Graph.name_scope) for more details.
See
[`Graph.name_scope()`](../../api_docs/python/framework.md#Graph.name_scope)
for more details.
Args:
name: A name for the scope.
......@@ -2563,7 +2571,7 @@ def name_scope(name):
def control_dependencies(control_inputs):
"""Wrapper for `Graph.control_dependencies()` using the default graph.
See [`Graph.control_dependencies()`](framework.md#Graph.control_dependencies)
See [`Graph.control_dependencies()`](../../api_docs/python/framework.md#Graph.control_dependencies)
for more details.
Args:
......@@ -2890,17 +2898,20 @@ class GraphKeys(object):
* `VARIABLES`: the `Variable` objects that comprise a model, and
must be saved and restored together. See
[`tf.all_variables()`](state_ops.md#all_variables) for more details.
[`tf.all_variables()`](../../api_docs/python/state_ops.md#all_variables)
for more details.
* `TRAINABLE_VARIABLES`: the subset of `Variable` objects that will
be trained by an optimizer. See
[`tf.trainable_variables()`](state_ops.md#trainable_variables)
[`tf.trainable_variables()`](../../api_docs/python/state_ops.md#trainable_variables)
for more details.
* `SUMMARIES`: the summary `Tensor` objects that have been created
in the graph. See [`tf.merge_all_summaries()`](train.md#merge_all_summaries)
* `SUMMARIES`: the summary `Tensor` objects that have been created in the
graph. See
[`tf.merge_all_summaries()`](../../api_docs/python/train.md#merge_all_summaries)
for more details.
* `QUEUE_RUNNERS`: the `QueueRunner` objects that are used to
produce input for a computation. See
[`tf.start_queue_runners()`](train.md#start_queue_runners) for more details.
[`tf.start_queue_runners()`](../../api_docs/python/train.md#start_queue_runners)
for more details.
"""
# Key to collect variables.Variable objects that must be saved and restored
......@@ -2920,7 +2931,7 @@ class GraphKeys(object):
def add_to_collection(name, value):
"""Wrapper for `Graph.add_to_collection()` using the default graph.
See [`Graph.add_to_collection()`](framework.md#Graph.add_to_collection)
See [`Graph.add_to_collection()`](../../api_docs/python/framework.md#Graph.add_to_collection)
for more details.
Args:
......@@ -2934,7 +2945,7 @@ def add_to_collection(name, value):
def get_collection(key, scope=None):
"""Wrapper for `Graph.get_collection()` using the default graph.
See [`Graph.get_collection()`](framework.md#Graph.get_collection)
See [`Graph.get_collection()`](../../api_docs/python/framework.md#Graph.get_collection)
for more details.
Args:
......
......@@ -16,7 +16,7 @@ def get_seed(op_seed):
graph, or for only specific operations.
For details on how the graph-level seed interacts with op seeds, see
[`set_random_seed`](constant_op.md#set_random_seed).
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed).
Args:
op_seed: integer.
......
......@@ -334,10 +334,10 @@ class TensorShape(object):
If a tensor is produced by an operation of type `"Foo"`, its shape
may be inferred if there is a registered shape function for
`"Foo"`. See [`tf.RegisterShape()`](framework.md#RegisterShape)
`"Foo"`. See [`tf.RegisterShape()`](../../api_docs/python/framework.md#RegisterShape)
for details of shape
functions and how to register them. Alternatively, the shape may be set
explicitly using [`Tensor.set_shape()`](framework.md#Tensor.set_shape).
explicitly using [`Tensor.set_shape()`](../../api_docs/python/framework.md#Tensor.set_shape).
@@merge_with
@@concatenate
......
......@@ -26,11 +26,13 @@ time they are evaluated.
The `seed` keyword argument in these functions acts in conjunction with
the graph-level random seed. Changing either the graph-level seed using
[`set_random_seed`](constant_op.md#set_random_seed) or the op-level seed
will change the underlying seed of these operations. Setting neither graph-level
nor op-level seed, results in a random seed for all operations.
See [`set_random_seed`](constant_op.md#set_random_seed) for details on the
interaction between operation-level and graph-level random seeds.
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed) or the
op-level seed will change the underlying seed of these operations. Setting
neither graph-level nor op-level seed, results in a random seed for all
operations.
See [`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for details on the interaction between operation-level and graph-level random
seeds.
### Examples:
......
......@@ -337,8 +337,9 @@ class RandomShuffleQueue(QueueBase):
the number of tensors in each queue element.
shapes: (Optional.) A list of fully-defined `TensorShape` objects,
with the same length as `dtypes` or `None`.
seed: A Python integer. Used to create a random seed.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
seed: A Python integer. Used to create a random seed. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
shared_name: (Optional.) If non-empty, this queue will be shared under
the given name across multiple sessions.
name: Optional name for the queue operation.
......
......@@ -12,8 +12,8 @@ def embedding_lookup(params, ids, name=None):
This function is used to perform parallel lookups on the list of
tensors in `params`. It is a generalization of
[`tf.gather()`](array_ops.md#gather), where `params` is interpreted
as a partition of a larger embedding tensor.
[`tf.gather()`](../../api_docs/python/array_ops.md#gather), where `params` is
interpreted as a partition of a larger embedding tensor.
If `len(params) > 1`, each element `id` of `ids` is partitioned between
the elements of `params` by computing `p = id % len(params)`, and is
......
......@@ -172,8 +172,9 @@ def random_flip_up_down(image, seed=None):
Args:
image: A 3-D tensor of shape `[height, width, channels].`
seed: A Python integer. Used to create a random seed.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
seed: A Python integer. Used to create a random seed. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
Returns:
A 3-D tensor of the same type and shape as `image`.
......@@ -195,8 +196,9 @@ def random_flip_left_right(image, seed=None):
Args:
image: A 3-D tensor of shape `[height, width, channels].`
seed: A Python integer. Used to create a random seed.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
seed: A Python integer. Used to create a random seed. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
Returns:
A 3-D tensor of the same type and shape as `image`.
......@@ -563,8 +565,9 @@ def random_brightness(image, max_delta, seed=None):
Args:
image: 3-D tensor of shape `[height, width, channels]`.
max_delta: float, must be non-negative.
seed: A Python integer. Used to create a random seed.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
seed: A Python integer. Used to create a random seed. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
Returns:
3-D tensor of images of shape `[height, width, channels]`
......@@ -591,8 +594,9 @@ def random_contrast(image, lower, upper, seed=None):
image: 3-D tensor of shape `[height, width, channels]`.
lower: float. Lower bound for the random contrast factor.
upper: float. Upper bound for the random contrast factor.
seed: A Python integer. Used to create a random seed.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
seed: A Python integer. Used to create a random seed. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
Returns:
3-D tensor of shape `[height, width, channels]`.
......@@ -775,8 +779,9 @@ def random_crop(image, size, seed=None, name=None):
Args:
image: 3-D tensor of shape `[height, width, channels]`
size: 1-D tensor with two elements, specifying target `[height, width]`
seed: A Python integer. Used to create a random seed.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
seed: A Python integer. Used to create a random seed. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
name: A name for this operation (optional).
Returns:
......
......@@ -32,8 +32,9 @@ def random_uniform_initializer(minval=0.0, maxval=1.0, seed=None):
of random values to generate.
maxval: a python scalar or a scalar tensor. upper bound of the range
of random values to generate.
seed: A Python integer. Used to create random seeds.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
seed: A Python integer. Used to create random seeds. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
Returns:
An initializer that generates Tensors with a uniform distribution.
......@@ -50,8 +51,9 @@ def random_normal_initializer(mean=0.0, stddev=1.0, seed=None):
to generate.
stddev: a python scalar or a scalar tensor. Standard deviation of the
random values to generate.
seed: A Python integer. Used to create random seeds.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
seed: A Python integer. Used to create random seeds. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
Returns:
An initializer that generates Tensors with a normal distribution.
......@@ -73,8 +75,9 @@ def truncated_normal_initializer(mean=0.0, stddev=1.0, seed=None):
to generate.
stddev: a python scalar or a scalar tensor. Standard deviation of the
random values to generate.
seed: A Python integer. Used to create random seeds.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
seed: A Python integer. Used to create random seeds. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
Returns:
An initializer that generates Tensors with a truncated normal
......@@ -104,8 +107,9 @@ def uniform_unit_scaling_initializer(factor=1.0, seed=None):
Args:
factor: Float. A multiplicative factor by which the values will be scaled.
seed: A Python integer. Used to create random seeds.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
seed: A Python integer. Used to create random seeds. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
Returns:
An initializer that generates tensors with unit variance.
......@@ -132,8 +136,9 @@ def _random_walk(shape, nonlinearity, dtype=types.float32, seed=None,
nonlinearity: the brain python function for implementing the
nonlinearity in tensor flow.
dtype: The type of the output.
seed: A Python integer. Used to create random seeds.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
seed: A Python integer. Used to create random seeds. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
name: string. Optional name for the op.
Returns:
......@@ -169,8 +174,9 @@ class _RandomWalkInitializer(object):
Args:
nonlinearity: the python tensorflow function that computes a nonlinearity
in the graph, typically after a Wx+b type operation.
seed: A Python integer. Used to create random seeds.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
seed: A Python integer. Used to create random seeds. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
"""
self._nonlinearity = nonlinearity
self._seed = seed
......
......@@ -346,8 +346,9 @@ def dropout(x, keep_prob, noise_shape=None, seed=None, name=None):
keep_prob: A Python float. The probability that each element is kept.
noise_shape: A 1-D `Tensor` of type `int32`, representing the
shape for randomly generated keep/drop flags.
seed: A Python integer. Used to create a random seed.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
seed: A Python integer. Used to create random seeds. See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
name: A name for this operation (optional).
Returns:
......
......@@ -34,7 +34,9 @@ def random_normal(shape, mean=0.0, stddev=1.0, dtype=types.float32,
of the normal distribution.
dtype: The type of the output.
seed: A Python integer. Used to create a random seed for the distribution.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
name: A name for the operation (optional).
Returns:
......@@ -74,7 +76,9 @@ def truncated_normal(shape, mean=0.0, stddev=1.0, dtype=types.float32,
of the truncated normal distribution.
dtype: The type of the output.
seed: A Python integer. Used to create a random seed for the distribution.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
name: A name for the operation (optional).
Returns:
......@@ -115,7 +119,9 @@ def random_uniform(shape, minval=0.0, maxval=1.0,
the range of random values to generate.
dtype: The type of the output.
seed: A Python integer. Used to create a random seed for the distribution.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
name: A name for the operation (optional).
Returns:
......@@ -151,7 +157,9 @@ def random_shuffle(value, seed=None, name=None):
Args:
value: A Tensor to be shuffled.
seed: A Python integer. Used to create a random seed for the distribution.
See [`set_random_seed`](constant_op.md#set_random_seed) for behavior.
See
[`set_random_seed`](../../api_docs/python/constant_op.md#set_random_seed)
for behavior.
name: A name for the operation (optional).
Returns:
......
......@@ -47,7 +47,8 @@ useful for training embedding models and similar lookup-based networks, since
only a small subset of embedding vectors change in any given step.
Since a sparse update of a large tensor may be generated automatically during
gradient computation (as in the gradient of [`tf.gather`](array_ops.md#gather)),
gradient computation (as in the gradient of
[`tf.gather`](../../api_docs/python/array_ops.md#gather)),
an [`IndexedSlices`](#IndexedSlices) class is provided that encapsulates a set
of sparse indices and values. `IndexedSlices` objects are detected and handled
automatically by the optimizers in most cases.
......
......@@ -207,7 +207,7 @@ class Variable(object):
This convenience method requires a session where the graph containing this
variable has been launched. If no session is passed, the default session is
used. See the [Session class](client.md#Session) for more information on
used. See the [Session class](../../api_docs/python/client.md#Session) for more information on
launching a graph and on sessions.
```python
......
......@@ -107,8 +107,8 @@ class ExponentialMovingAverage(object):
for a given variable.
* Build a model normally but load the checkpoint files to evaluate by using
the shadow variable names. For this use the `average_name()` method. See
the [Saver class](train.md#Saver) for more information on restoring saved
variables.
the [Saver class](../../api_docs/python/train.md#Saver) for more
information on restoring saved variables.
Example of restoring the shadow variable values:
......
......@@ -75,8 +75,8 @@ The following ops output
protocol buffers as serialized string tensors.
You can fetch the output of a summary op in a session, and pass it to
a [SummaryWriter](train.md#SummaryWriter) to append it to an event
file. Event files contain
a [SummaryWriter](../../api_docs/python/train.md#SummaryWriter) to append it
to an event file. Event files contain
[`Event`](https://tensorflow.googlesource.com/tensorflow/+/master/tensorflow/core/util/event.proto)
protos that can contain `Summary` protos along with the timestamp and
step. You can then use TensorBoard to visualize the contents of the
......
......@@ -6,7 +6,7 @@ from setuptools.dist import Distribution
_VERSION = '0.5.0'
REQUIRED_PACKAGES = [
'numpy >= 1.10.1',
'numpy >= 1.9.2',
'six >= 1.10.0',
]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册