Skip to content

Commit 40ec3db

Browse files
Patrick NguyenAmit Patankar
authored andcommitted
Fix links according to new convention.
Change: 147499520
1 parent 04af672 commit 40ec3db

27 files changed

+198
-161
lines changed

tensorflow/python/client/session.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -605,8 +605,8 @@ def as_default(self):
605605
"""Returns a context manager that makes this object the default session.
606606
607607
Use with the `with` keyword to specify that calls to
608-
[`Operation.run()`](../../api_docs/python/framework.md#Operation.run) or
609-
[`Tensor.eval()`](../../api_docs/python/framework.md#Tensor.eval) should be
608+
@{tf.Operation.run} or
609+
@{tf.Tensor.eval} should be
610610
executed in this session.
611611
612612
```python
@@ -619,7 +619,7 @@ def as_default(self):
619619
```
620620
621621
To get the current default session, use
622-
[`tf.get_default_session()`](#get_default_session).
622+
@{tf.get_default_session}.
623623
624624
625625
*N.B.* The `as_default` context manager *does not* close the
@@ -665,14 +665,14 @@ def run(self, fetches, feed_dict=None, options=None, run_metadata=None):
665665
nested list, tuple, namedtuple, dict, or OrderedDict containing graph
666666
elements at its leaves. A graph element can be one of the following types:
667667
668-
* An [`Operation`](../../api_docs/python/framework.md#Operation).
668+
* An @{tf.Operation}.
669669
The corresponding fetched value will be `None`.
670-
* A [`Tensor`](../../api_docs/python/framework.md#Tensor).
670+
* A @{tf.Tensor}.
671671
The corresponding fetched value will be a numpy ndarray containing the
672672
value of that tensor.
673-
* A [`SparseTensor`](../../api_docs/python/sparse_ops.md#SparseTensor).
673+
* A @{tf.SparseTensor}.
674674
The corresponding fetched value will be a
675-
[`SparseTensorValue`](../../api_docs/python/sparse_ops.md#SparseTensorValue)
675+
@{tf.SparseTensorValue}
676676
containing the value of that sparse tensor.
677677
* A `get_tensor_handle` op. The corresponding fetched value will be a
678678
numpy ndarray containing the handle of that tensor.
@@ -708,16 +708,16 @@ def run(self, fetches, feed_dict=None, options=None, run_metadata=None):
708708
the value of tensors in the graph. Each key in `feed_dict` can be
709709
one of the following types:
710710
711-
* If the key is a [`Tensor`](../../api_docs/python/framework.md#Tensor), the
711+
* If the key is a @{tf.Tensor}, the
712712
value may be a Python scalar, string, list, or numpy ndarray
713713
that can be converted to the same `dtype` as that
714714
tensor. Additionally, if the key is a
715-
[placeholder](../../api_docs/python/io_ops.md#placeholder), the shape of
715+
@{tf.placeholder}, the shape of
716716
the value will be checked for compatibility with the placeholder.
717717
* If the key is a
718-
[`SparseTensor`](../../api_docs/python/sparse_ops.md#SparseTensor),
718+
@{tf.SparseTensor},
719719
the value should be a
720-
[`SparseTensorValue`](../../api_docs/python/sparse_ops.md#SparseTensorValue).
720+
@{tf.SparseTensorValue}.
721721
* If the key is a nested tuple of `Tensor`s or `SparseTensor`s, the value
722722
should be a nested tuple with the same structure that maps to their
723723
corresponding values as above.
@@ -1120,10 +1120,10 @@ class Session(BaseSession):
11201120
```
11211121
11221122
A session may own resources, such as
1123-
[variables](../../api_docs/python/state_ops.md#Variable), [queues](../../api_docs/python/io_ops.md#QueueBase),
1124-
and [readers](../../api_docs/python/io_ops.md#ReaderBase). It is important to release
1123+
@{tf.Variable}, @{tf.QueueBase},
1124+
and @{tf.ReaderBase}. It is important to release
11251125
these resources when they are no longer required. To do this, either
1126-
invoke the [`close()`](#Session.close) method on the session, or use
1126+
invoke the @{tf.Session.close} method on the session, or use
11271127
the session as a context manager. The following two examples are
11281128
equivalent:
11291129
@@ -1166,7 +1166,7 @@ def __init__(self, target='', graph=None, config=None):
11661166
Args:
11671167
target: (Optional.) The execution engine to connect to.
11681168
Defaults to using an in-process engine. See
1169-
[Distributed Tensorflow](https://www.tensorflow.org/how_tos/distributed/index.html)
1169+
@{$distributed$Distributed TensorFlow}
11701170
for more examples.
11711171
graph: (Optional.) The `Graph` to be launched (described above).
11721172
config: (Optional.) A [`ConfigProto`](https://www.tensorflow.org/code/tensorflow/core/protobuf/config.proto)
@@ -1242,8 +1242,8 @@ class InteractiveSession(BaseSession):
12421242
12431243
The only difference with a regular `Session` is that an `InteractiveSession`
12441244
installs itself as the default session on construction.
1245-
The methods [`Tensor.eval()`](../../api_docs/python/framework.md#Tensor.eval)
1246-
and [`Operation.run()`](../../api_docs/python/framework.md#Operation.run)
1245+
The methods @{tf.Tensor.eval}
1246+
and @{tf.Operation.run}
12471247
will use that session to run ops.
12481248
12491249
This is convenient in interactive shells and [IPython

tensorflow/python/debug/wrappers/dumping_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self, sess, session_root, watch_fn=None, log_usage=True):
3939
session_root: (`str`) Path to the session root directory. Must be a
4040
directory that does not exist or an empty directory. If the directory
4141
does not exist, it will be created by the debugger core during debug
42-
[`Session.run()`](../../../g3doc/api_docs/python/client.md#session.run)
42+
@{tf.Session.run}
4343
calls.
4444
As the `run()` calls occur, subdirectories will be added to
4545
`session_root`. The subdirectories' names has the following pattern:

tensorflow/python/framework/errors_impl.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ def op(self):
6161
6262
*N.B.* If the failed op was synthesized at runtime, e.g. a `Send`
6363
or `Recv` op, there will be no corresponding
64-
[`Operation`](../../api_docs/python/framework.md#Operation)
64+
@{tf.Operation}
6565
object. In that case, this will return `None`, and you should
66-
instead use the [`OpError.node_def`](#OpError.node_def) to
66+
instead use the @{tf.OpError.node_def} to
6767
discover information about the op.
6868
6969
Returns:
@@ -156,10 +156,10 @@ class CancelledError(OpError):
156156
"""Raised when an operation or step is cancelled.
157157
158158
For example, a long-running operation (e.g.
159-
[`queue.enqueue()`](../../api_docs/python/io_ops.md#QueueBase.enqueue) may be
159+
@{tf.QueueBase.enqueue} may be
160160
cancelled by running another operation (e.g.
161-
[`queue.close(cancel_pending_enqueues=True)`](../../api_docs/python/io_ops.md#QueueBase.close),
162-
or by [closing the session](../../api_docs/python/client.md#Session.close).
161+
@{tf.QueueBase.close},
162+
or by @{tf.Session.close}.
163163
A step that is running such a long-running operation will fail by raising
164164
`CancelledError`.
165165
@@ -194,9 +194,9 @@ class InvalidArgumentError(OpError):
194194
195195
This may occur, for example, if an operation is receives an input
196196
tensor that has an invalid value or shape. For example, the
197-
[`tf.matmul()`](../../api_docs/python/math_ops.md#matmul) op will raise this
197+
@{tf.matmul} op will raise this
198198
error if it receives an input that is not a matrix, and the
199-
[`tf.reshape()`](../../api_docs/python/array_ops.md#reshape) op will raise
199+
@{tf.reshape} op will raise
200200
this error if the new shape does not match the number of elements in the input
201201
tensor.
202202
@@ -227,7 +227,7 @@ class NotFoundError(OpError):
227227
"""Raised when a requested entity (e.g., a file or directory) was not found.
228228
229229
For example, running the
230-
[`tf.WholeFileReader.read()`](../../api_docs/python/io_ops.md#WholeFileReader)
230+
@{tf.WholeFileReader.read}
231231
operation could raise `NotFoundError` if it receives the name of a file that
232232
does not exist.
233233
@@ -243,7 +243,7 @@ class AlreadyExistsError(OpError):
243243
"""Raised when an entity that we attempted to create already exists.
244244
245245
For example, running an operation that saves a file
246-
(e.g. [`tf.train.Saver.save()`](../../api_docs/python/train.md#Saver.save))
246+
(e.g. @{tf.train.Saver.save})
247247
could potentially raise this exception if an explicit filename for an
248248
existing file was passed.
249249
@@ -260,7 +260,7 @@ class PermissionDeniedError(OpError):
260260
"""Raised when the caller does not have permission to run an operation.
261261
262262
For example, running the
263-
[`tf.WholeFileReader.read()`](../../api_docs/python/io_ops.md#WholeFileReader)
263+
@{tf.WholeFileReader.read}
264264
operation could raise `PermissionDeniedError` if it receives the name of a
265265
file for which the user does not have the read file permission.
266266
@@ -306,7 +306,7 @@ class FailedPreconditionError(OpError):
306306
"""Operation was rejected because the system is not in a state to execute it.
307307
308308
This exception is most commonly raised when running an operation
309-
that reads a [`tf.Variable`](../../api_docs/python/state_ops.md#Variable)
309+
that reads a @{tf.Variable}
310310
before it has been initialized.
311311
312312
@@__init__
@@ -322,9 +322,9 @@ class AbortedError(OpError):
322322
"""The operation was aborted, typically due to a concurrent action.
323323
324324
For example, running a
325-
[`queue.enqueue()`](../../api_docs/python/io_ops.md#QueueBase.enqueue)
325+
@{tf.QueueBase.enqueue}
326326
operation may raise `AbortedError` if a
327-
[`queue.close()`](../../api_docs/python/io_ops.md#QueueBase.close) operation
327+
@{tf.QueueBase.close} operation
328328
previously ran.
329329
330330
@@__init__
@@ -339,9 +339,9 @@ class OutOfRangeError(OpError):
339339
"""Raised when an operation iterates past the valid input range.
340340
341341
This exception is raised in "end-of-file" conditions, such as when a
342-
[`queue.dequeue()`](../../api_docs/python/io_ops.md#QueueBase.dequeue)
342+
@{tf.QueueBase.dequeue}
343343
operation is blocked on an empty queue, and a
344-
[`queue.close()`](../../api_docs/python/io_ops.md#QueueBase.close)
344+
@{tf.QueueBase.close}
345345
operation executes.
346346
347347
@@__init__
@@ -358,7 +358,7 @@ class UnimplementedError(OpError):
358358
359359
Some operations may raise this error when passed otherwise-valid
360360
arguments that it does not currently support. For example, running
361-
the [`tf.nn.max_pool()`](../../api_docs/python/nn.md#max_pool) operation
361+
the @{tf.nn.max_pool} operation
362362
would raise this error if pooling was requested on the batch dimension,
363363
because this is not yet supported.
364364
@@ -403,7 +403,7 @@ class DataLossError(OpError):
403403
"""Raised when unrecoverable data loss or corruption is encountered.
404404
405405
For example, this may be raised by running a
406-
[`tf.WholeFileReader.read()`](../../api_docs/python/io_ops.md#WholeFileReader)
406+
@{tf.WholeFileReader.read}
407407
operation, if the file is truncated while it is being read.
408408
409409
@@__init__

tensorflow/python/framework/gen_docs_combined.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
PREFIX_TEXT = """
3939
Note: Functions taking `Tensor` arguments can also take anything accepted by
40-
[`tf.convert_to_tensor`](framework.md#convert_to_tensor).
40+
@{tf.convert_to_tensor}.
4141
"""
4242

4343

tensorflow/python/framework/importer.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,10 @@ def import_graph_def(graph_def, input_map=None, return_elements=None,
156156
This function provides a way to import a serialized TensorFlow
157157
[`GraphDef`](https://www.tensorflow.org/code/tensorflow/core/framework/graph.proto)
158158
protocol buffer, and extract individual objects in the `GraphDef` as
159-
[`Tensor`](#Tensor) and [`Operation`](#Operation) objects. See
160-
[`Graph.as_graph_def()`](#Graph.as_graph_def) for a way to create a
161-
`GraphDef` proto.
159+
@{tf.Tensor} and @{tf.Operation} objects. Once extracted,
160+
these objects are placed into the current default `Graph`. See
161+
@{tf.Graph.as_graph_def} for a way to create a `GraphDef`
162+
proto.
162163
163164
Args:
164165
graph_def: A `GraphDef` proto containing operations to be imported into

0 commit comments

Comments
 (0)