diff --git a/tensorflow/core/ops/math_ops.cc b/tensorflow/core/ops/math_ops.cc index 20e56316eac7df4624dfc70373d1067d9a638f27..58c091bc9f0ec70a1e687643bfdc804b992994d6 100644 --- a/tensorflow/core/ops/math_ops.cc +++ b/tensorflow/core/ops/math_ops.cc @@ -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`. diff --git a/tensorflow/g3doc/api_docs/cc/index.md b/tensorflow/g3doc/api_docs/cc/index.md index 97a213e50d710219f1585d779ba946dbdecba71b..c4bd0cd32a69131883fef78ffe2a792d85e0fa5d 100644 --- a/tensorflow/g3doc/api_docs/cc/index.md +++ b/tensorflow/g3doc/api_docs/cc/index.md @@ -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: diff --git a/tensorflow/g3doc/api_docs/python/array_ops.md b/tensorflow/g3doc/api_docs/python/array_ops.md index 44b32ecc8e7f2d7b46a7857de6106efb7409ecff..b0e71a89192c638d3beb5d9f1b00a32ddb1f1fe7 100644 --- a/tensorflow/g3doc/api_docs/python/array_ops.md +++ b/tensorflow/g3doc/api_docs/python/array_ops.md @@ -2,8 +2,8 @@ # Tensor Transformations -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). ## Contents diff --git a/tensorflow/g3doc/api_docs/python/client.md b/tensorflow/g3doc/api_docs/python/client.md index 738225a656a23714cedd6b9fffa5494dfab7297a..7f7f87913af125b048f6de8e901904db04423aa7 100644 --- a/tensorflow/g3doc/api_docs/python/client.md +++ b/tensorflow/g3doc/api_docs/python/client.md @@ -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: @@ -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. - - - diff --git a/tensorflow/g3doc/api_docs/python/constant_op.md b/tensorflow/g3doc/api_docs/python/constant_op.md index 59053a576e75bb01201b48630eb2ce3af5b51229..da0657353d1905116f0fa8b6af3adc255f0c3108 100644 --- a/tensorflow/g3doc/api_docs/python/constant_op.md +++ b/tensorflow/g3doc/api_docs/python/constant_op.md @@ -2,8 +2,8 @@ # Constants, Sequences, and Random Values -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). ## 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: @@ -373,7 +375,9 @@ Outputs random values from a normal distribution. 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: @@ -401,7 +405,9 @@ deviations from the mean are dropped and re-picked. 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: @@ -429,7 +435,9 @@ the upper bound `maxval` is excluded. 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: @@ -458,7 +466,9 @@ to one and only one `output[i]`. For example, a mapping that might occur for a * 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: diff --git a/tensorflow/g3doc/api_docs/python/control_flow_ops.md b/tensorflow/g3doc/api_docs/python/control_flow_ops.md index eda97dc22235db3fb500f519e7ab5857434b8cb0..27f104b359d2491a2016bda8e0d30d91e0c92d2f 100644 --- a/tensorflow/g3doc/api_docs/python/control_flow_ops.md +++ b/tensorflow/g3doc/api_docs/python/control_flow_ops.md @@ -2,8 +2,8 @@ # Control Flow -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). ## Contents diff --git a/tensorflow/g3doc/api_docs/python/framework.md b/tensorflow/g3doc/api_docs/python/framework.md index 1900af97a285cc7701477db41c53c348cd25ab57..6134745482e72e81abf1d4510b50ddd4a7840bfa 100644 --- a/tensorflow/g3doc/api_docs/python/framework.md +++ b/tensorflow/g3doc/api_docs/python/framework.md @@ -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. * 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. @@ -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. * 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. @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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 @@ -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: diff --git a/tensorflow/g3doc/api_docs/python/image.md b/tensorflow/g3doc/api_docs/python/image.md index c631af9c97df99cc154eadf7bfe18e477391cc0e..82c2a913c1bce8ed845952d9bbc5c936f7f56221 100644 --- a/tensorflow/g3doc/api_docs/python/image.md +++ b/tensorflow/g3doc/api_docs/python/image.md @@ -2,8 +2,8 @@ # Images -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). ## Contents @@ -497,8 +497,9 @@ fully contains the result. * 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: @@ -601,8 +602,9 @@ dimension, which is `height`. Otherwise output the image as-is. * 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: @@ -654,8 +656,9 @@ second dimension, which is `width`. Otherwise output the image as-is. * 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: @@ -744,8 +747,9 @@ have modifications in the range `[-max_delta,max_delta]`. * 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: @@ -814,8 +818,9 @@ picked in the interval `[lower, upper]`. * 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: diff --git a/tensorflow/g3doc/api_docs/python/io_ops.md b/tensorflow/g3doc/api_docs/python/io_ops.md index 3fbcf3634b285640a7a64ec297fb9b51281440e8..de47ef615e35dd996d6d617ef93bb9fb2e7029d7 100644 --- a/tensorflow/g3doc/api_docs/python/io_ops.md +++ b/tensorflow/g3doc/api_docs/python/io_ops.md @@ -2,8 +2,8 @@ # Inputs and Readers -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). ## Contents @@ -1591,8 +1591,9 @@ queue has been closed. 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. diff --git a/tensorflow/g3doc/api_docs/python/math_ops.md b/tensorflow/g3doc/api_docs/python/math_ops.md index 42730255435b8c5fae6040960d01db21ec33411a..554433d868c8133304830e4a5e8c3b502c910f5d 100644 --- a/tensorflow/g3doc/api_docs/python/math_ops.md +++ b/tensorflow/g3doc/api_docs/python/math_ops.md @@ -2,8 +2,8 @@ # Math -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). ## 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`. diff --git a/tensorflow/g3doc/api_docs/python/nn.md b/tensorflow/g3doc/api_docs/python/nn.md index ada49a6b11f595793c1bfb29e22131fadaebc5f8..91aa8ccc9b7d38db68d857709ae4b9d74467c5a2 100644 --- a/tensorflow/g3doc/api_docs/python/nn.md +++ b/tensorflow/g3doc/api_docs/python/nn.md @@ -2,8 +2,8 @@ # Neural Network -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). ## Contents @@ -142,8 +142,9 @@ kept independently and each row and column will be kept or not kept together. * 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: @@ -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 diff --git a/tensorflow/g3doc/api_docs/python/sparse_ops.md b/tensorflow/g3doc/api_docs/python/sparse_ops.md index 7d338f2efbf3171821f2c1b9528871c581c662be..a77131d582088e62d8e6d4638a31b442895b58f5 100644 --- a/tensorflow/g3doc/api_docs/python/sparse_ops.md +++ b/tensorflow/g3doc/api_docs/python/sparse_ops.md @@ -2,8 +2,8 @@ # Sparse Tensors -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). ## Contents diff --git a/tensorflow/g3doc/api_docs/python/state_ops.md b/tensorflow/g3doc/api_docs/python/state_ops.md index 2c6ca5e7aa49c80c8ab71487d46918c126707df6..09f951c074650ac4a12d9186ee5c15dd7f82e19c 100644 --- a/tensorflow/g3doc/api_docs/python/state_ops.md +++ b/tensorflow/g3doc/api_docs/python/state_ops.md @@ -2,8 +2,8 @@ # Variables -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). ## 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. * 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: @@ -1034,8 +1035,9 @@ neural network weights and filters. 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: @@ -1056,8 +1058,9 @@ Returns an initializer that generates Tensors with a uniform distribution. 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: @@ -1089,8 +1092,9 @@ numerically computed: for a linear layer it's 1.0, relu: ~1.43, tanh: ~1.15. * 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: @@ -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. - - - diff --git a/tensorflow/g3doc/api_docs/python/train.md b/tensorflow/g3doc/api_docs/python/train.md index c0199a020e4877d73faf8765c165ee579dc11928..2c1cc57ac7d2d00481b188e609e4a27455b13ba5 100644 --- a/tensorflow/g3doc/api_docs/python/train.md +++ b/tensorflow/g3doc/api_docs/python/train.md @@ -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 diff --git a/tensorflow/g3doc/how_tos/summaries_and_tensorboard/index.md b/tensorflow/g3doc/how_tos/summaries_and_tensorboard/index.md index 75a23d109566ef097e63632b528528c802884894..f7c87284af83ca6ede4af7adac22e4c89e2247e2 100644 --- a/tensorflow/g3doc/how_tos/summaries_and_tensorboard/index.md +++ b/tensorflow/g3doc/how_tos/summaries_and_tensorboard/index.md @@ -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 diff --git a/tensorflow/g3doc/tutorials/deep_cnn/index.md b/tensorflow/g3doc/tutorials/deep_cnn/index.md index 44ffe879b8f1a5be335d996b5a4f867b1b5722ef..26b2906e0ad352530f366cd2d70d4aeb49e5b11b 100644 --- a/tensorflow/g3doc/tutorials/deep_cnn/index.md +++ b/tensorflow/g3doc/tutorials/deep_cnn/index.md @@ -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) 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) 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. - - - diff --git a/tensorflow/python/client/session.py b/tensorflow/python/client/session.py index 571030de67c96f1a550e6bca7b3fcaa7c902662f..0ac7f52df96413593b14520c700b9195d7635d7a 100644 --- a/tensorflow/python/client/session.py +++ b/tensorflow/python/client/session.py @@ -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 diff --git a/tensorflow/python/framework/errors.py b/tensorflow/python/framework/errors.py index b3f9a78a0feccac6b5ecbe21ba3ef85e3f537dd5..948057b8aa4fcba9a333e726894a5512f2ae9f35 100644 --- a/tensorflow/python/framework/errors.py +++ b/tensorflow/python/framework/errors.py @@ -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__ """ diff --git a/tensorflow/python/framework/gen_docs_combined.py b/tensorflow/python/framework/gen_docs_combined.py index ed9c2e24a87ab9ebda47ac1a9fc93b3b9d29e0ed..873e48d85d45ae2066ccbe0b5a06a1f5f9089d72 100644 --- a/tensorflow/python/framework/gen_docs_combined.py +++ b/tensorflow/python/framework/gen_docs_combined.py @@ -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). """ diff --git a/tensorflow/python/framework/ops.py b/tensorflow/python/framework/ops.py index d5e6e3bcd99d726801148b09f3c00f86f25b488c..024cd69b60c17ad07b45a4c859cb90f736a7f031 100644 --- a/tensorflow/python/framework/ops.py +++ b/tensorflow/python/framework/ops.py @@ -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: diff --git a/tensorflow/python/framework/random_seed.py b/tensorflow/python/framework/random_seed.py index d0ffee7042420e579c63c8322f4c1f216262a989..11a49195c24a3900f5c6a46bb64171efeb38e96d 100644 --- a/tensorflow/python/framework/random_seed.py +++ b/tensorflow/python/framework/random_seed.py @@ -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. diff --git a/tensorflow/python/framework/tensor_shape.py b/tensorflow/python/framework/tensor_shape.py index d4f27696d425a603130c8ec0e36c5832d5669a38..1fef77e479c195c7e911756c7b113066ea0a8aca 100644 --- a/tensorflow/python/framework/tensor_shape.py +++ b/tensorflow/python/framework/tensor_shape.py @@ -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 diff --git a/tensorflow/python/ops/constant_op.py b/tensorflow/python/ops/constant_op.py index 7d9044b689319c2fac053a1602584a0f6cd33814..b1b1675455afc05ce17cc2abfc0b8646353de7a8 100644 --- a/tensorflow/python/ops/constant_op.py +++ b/tensorflow/python/ops/constant_op.py @@ -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: diff --git a/tensorflow/python/ops/data_flow_ops.py b/tensorflow/python/ops/data_flow_ops.py index 5c8ab662971a9bcf206d91fcded1e78ddbdd2608..1f299fd551e6d095660f22b91436ed3a71fe3a7b 100644 --- a/tensorflow/python/ops/data_flow_ops.py +++ b/tensorflow/python/ops/data_flow_ops.py @@ -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. diff --git a/tensorflow/python/ops/embedding_ops.py b/tensorflow/python/ops/embedding_ops.py index d9a377bab5347d8e4a0825b3452f3a0a08e87d9a..6c73e687d6fab108d4f8997e289ec24e56fe8d42 100644 --- a/tensorflow/python/ops/embedding_ops.py +++ b/tensorflow/python/ops/embedding_ops.py @@ -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 diff --git a/tensorflow/python/ops/image_ops.py b/tensorflow/python/ops/image_ops.py index 89f982141c6c3701cf28884a5f8a3f826a77a27f..189b72e0c7406f90540dbbfa07024f8a5a03f305 100644 --- a/tensorflow/python/ops/image_ops.py +++ b/tensorflow/python/ops/image_ops.py @@ -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: diff --git a/tensorflow/python/ops/init_ops.py b/tensorflow/python/ops/init_ops.py index 09c8801e0ef7a9943e59295d00677a3ec0e626d1..fe074d25561cd422095ecb4c9f70d6100d4a1168 100644 --- a/tensorflow/python/ops/init_ops.py +++ b/tensorflow/python/ops/init_ops.py @@ -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 diff --git a/tensorflow/python/ops/nn.py b/tensorflow/python/ops/nn.py index 004ceb51c6eeefc3a6a053fc9162e7ed59822236..1ad08ca4c9af7b68e9fbd4908872045ad01160bb 100644 --- a/tensorflow/python/ops/nn.py +++ b/tensorflow/python/ops/nn.py @@ -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: diff --git a/tensorflow/python/ops/random_ops.py b/tensorflow/python/ops/random_ops.py index 6bd8dd9e3d25c40c6da4ff2dfff7434a32d9d5f2..07af214d6c03dc8426f24dbb3e876994a443351b 100644 --- a/tensorflow/python/ops/random_ops.py +++ b/tensorflow/python/ops/random_ops.py @@ -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: diff --git a/tensorflow/python/ops/state_ops.py b/tensorflow/python/ops/state_ops.py index 2e77bfafc4b37cc7c8820d3dba6970c29c7cc36d..011761904e90ff74a145561edfa3b80bc94a6bad 100644 --- a/tensorflow/python/ops/state_ops.py +++ b/tensorflow/python/ops/state_ops.py @@ -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. diff --git a/tensorflow/python/ops/variables.py b/tensorflow/python/ops/variables.py index ac202bb6e269974430173fe0125c9221ef16f5f0..2f30c85da2232a6448d6af4a6cfa67325cce3f80 100644 --- a/tensorflow/python/ops/variables.py +++ b/tensorflow/python/ops/variables.py @@ -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 diff --git a/tensorflow/python/training/moving_averages.py b/tensorflow/python/training/moving_averages.py index 49fadb83c78adc5c9b50d734e0a9c35123960a92..e0062a902bbba5cf92bf84f54f2ff327b23ab35d 100644 --- a/tensorflow/python/training/moving_averages.py +++ b/tensorflow/python/training/moving_averages.py @@ -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: diff --git a/tensorflow/python/training/training.py b/tensorflow/python/training/training.py index 84c8156c266c6ffee8fd41ef25423bb2c71c1bd0..cb6b93bfd0d2932da5851306942d855be7ac5292 100644 --- a/tensorflow/python/training/training.py +++ b/tensorflow/python/training/training.py @@ -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 diff --git a/tensorflow/tools/pip_package/setup.py b/tensorflow/tools/pip_package/setup.py index 55db7ce6bdf36a7e65858740fb8d052f780c4c56..e5d25c52ee5ec47a14122b331f587c72230325bf 100644 --- a/tensorflow/tools/pip_package/setup.py +++ b/tensorflow/tools/pip_package/setup.py @@ -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', ]