@@ -61,8 +61,8 @@ print sess.run(c)
61
61
```
62
62
63
63
A session may own resources, such as
64
- [ variables] ( state_ops.md#Variable ) , [ queues] ( io_ops.md#QueueBase ) ,
65
- and [ readers] ( io_ops.md#ReaderBase ) . It is important to release
64
+ [ variables] ( ../../api_docs/python/ state_ops.md#Variable) , [ queues] ( ../../api_docs/python/ io_ops.md#QueueBase) ,
65
+ and [ readers] ( ../../api_docs/python/ io_ops.md#ReaderBase) . It is important to release
66
66
these resources when they are no longer required. To do this, either
67
67
invoke the [ ` close() ` ] ( #Session.close ) method on the session, or use
68
68
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
134
134
method. A graph element can be one of the following types:
135
135
136
136
* If the * i* th element of ` fetches ` is an
137
- [ ` Operation ` ] ( framework.md#Operation ) , the * i* th return value
138
- will be ` None ` .
137
+ [ ` Operation ` ] ( ../../api_docs/python/ framework.md#Operation) , the * i* th
138
+ return value will be ` None ` .
139
139
* If the * i* th element of ` fetches ` is a
140
- [ ` Tensor ` ] ( framework.md#Tensor ) , the * i* th return value will
141
- be a numpy ndarray containing the value of that tensor.
140
+ [ ` Tensor ` ] ( ../../api_docs/python/ framework.md#Tensor) , the * i* th return
141
+ value will be a numpy ndarray containing the value of that tensor.
142
142
* If the * i* th element of ` fetches ` is a
143
- [ ` SparseTensor ` ] ( sparse_ops.md#SparseTensor ) , the * i * th
144
- return value will be a
145
- [ ` SparseTensorValue ` ] ( sparse_ops.md#SparseTensorValue )
143
+ [ ` SparseTensor ` ] ( ../../api_docs/python/ sparse_ops.md#SparseTensor) ,
144
+ the * i * th return value will be a
145
+ [ ` SparseTensorValue ` ] ( ../../api_docs/python/ sparse_ops.md#SparseTensorValue)
146
146
containing the value of that sparse tensor.
147
147
148
148
The optional ` feed_dict ` argument allows the caller to override
149
149
the value of tensors in the graph. Each key in ` feed_dict ` can be
150
150
one of the following types:
151
151
152
- * If the key is a [ ` Tensor ` ] ( framework.md#Tensor ) , the
152
+ * If the key is a [ ` Tensor ` ] ( ../../api_docs/python/ framework.md#Tensor) , the
153
153
value may be a Python scalar, string, list, or numpy ndarray
154
154
that can be converted to the same ` dtype ` as that
155
155
tensor. Additionally, if the key is a
156
- [ placeholder] ( io_ops.md#placeholder ) , the shape of the value
157
- will be checked for compatibility with the placeholder.
158
- * If the key is a [ ` SparseTensor ` ] ( sparse_ops.md#SparseTensor ) ,
156
+ [ placeholder] ( ../../api_docs/python/io_ops.md#placeholder ) , the shape of
157
+ the value will be checked for compatibility with the placeholder.
158
+ * If the key is a
159
+ [ ` SparseTensor ` ] ( ../../api_docs/python/sparse_ops.md#SparseTensor ) ,
159
160
the value should be a
160
- [ ` SparseTensorValue ` ] ( sparse_ops.md#SparseTensorValue ) .
161
+ [ ` SparseTensorValue ` ] ( ../../api_docs/python/ sparse_ops.md#SparseTensorValue) .
161
162
162
163
##### Args: <a class =" md-anchor " id =" AUTOGENERATED-args- " ></a >
163
164
@@ -211,9 +212,9 @@ The graph that was launched in this session.
211
212
Returns a context manager that makes this object the default session.
212
213
213
214
Use with the ` with ` keyword to specify that calls to
214
- [ ` Operation.run() ` ] ( framework.md#Operation.run ) or
215
- [ ` Tensor.run() ` ] ( framework.md#Tensor.run ) should be executed in
216
- this session.
215
+ [ ` Operation.run() ` ] ( ../../api_docs/python/ framework.md#Operation.run) or
216
+ [ ` Tensor.run() ` ] ( ../../api_docs/python/ framework.md#Tensor.run) should be
217
+ executed in this session.
217
218
218
219
``` python
219
220
c = tf.constant(..)
@@ -267,9 +268,9 @@ A TensorFlow `Session` for use in interactive contexts, such as a shell.
267
268
268
269
The only difference with a regular ` Session ` is that an ` InteractiveSession `
269
270
installs itself as the default session on construction.
270
- The methods [ ` Tensor.eval() ` ] ( framework.md#Tensor.eval ) and
271
- [ ` Operation.run() ` ] ( framework.md#Operation.run ) will use that session
272
- to run ops.
271
+ The methods [ ` Tensor.eval() ` ] ( ../../api_docs/python/ framework.md#Tensor.eval)
272
+ and [ ` Operation.run() ` ] ( ../../api_docs/python/ framework.md#Operation.run)
273
+ will use that session to run ops.
273
274
274
275
This is convenient in interactive shells and [ IPython
275
276
notebooks] ( http://ipython.org ) , as it avoids having to pass an explicit
@@ -371,7 +372,7 @@ The operation that failed, if known.
371
372
372
373
* N.B.* If the failed op was synthesized at runtime, e.g. a ` Send `
373
374
or ` Recv ` op, there will be no corresponding
374
- [ ` Operation ` ] ( framework.md#Operation ) object. In that case, this
375
+ [ ` Operation ` ] ( ../../api_docs/python/ framework.md#Operation) object. In that case, this
375
376
will return ` None ` , and you should instead use the
376
377
[ ` OpError.node_def ` ] ( #OpError.node_def ) to discover information about the
377
378
op.
@@ -423,11 +424,12 @@ The error message that describes the error.
423
424
Raised when an operation or step is cancelled.
424
425
425
426
For example, a long-running operation (e.g.
426
- [ ` queue.enqueue() ` ] ( io_ops.md#QueueBase.enqueue ) may be cancelled by
427
- running another operation (e.g.
428
- [ ` queue.close(cancel_pending_enqueues=True) ` ] ( io_ops.md#QueueBase.close ) ,
429
- or by [ closing the session] ( client.md#Session.close ) . A step that is
430
- running such a long-running operation will fail by raising ` CancelledError ` .
427
+ [ ` queue.enqueue() ` ] ( ../../api_docs/python/io_ops.md#QueueBase.enqueue ) may be
428
+ cancelled by running another operation (e.g.
429
+ [ ` queue.close(cancel_pending_enqueues=True) ` ] ( ../../api_docs/python/io_ops.md#QueueBase.close ) ,
430
+ or by [ closing the session] ( ../../api_docs/python/client.md#Session.close ) .
431
+ A step that is running such a long-running operation will fail by raising
432
+ ` CancelledError ` .
431
433
432
434
- - -
433
435
@@ -465,10 +467,10 @@ Raised when an operation receives an invalid argument.
465
467
466
468
This may occur, for example, if an operation is receives an input
467
469
tensor that has an invalid value or shape. For example, the
468
- [ ` tf.matmul() ` ] ( math_ops.md#matmul ) op will raise this error if it
469
- receives an input that is not a matrix, and the
470
- [ ` tf.reshape() ` ] ( array_ops.md#reshape ) op will raise this error if
471
- the new shape does not match the number of elements in the input
470
+ [ ` tf.matmul() ` ] ( ../../api_docs/python/ math_ops.md#matmul) op will raise this
471
+ error if it receives an input that is not a matrix, and the
472
+ [ ` tf.reshape() ` ] ( ../../api_docs/python/ array_ops.md#reshape) op will raise
473
+ this error if the new shape does not match the number of elements in the input
472
474
tensor.
473
475
474
476
- - -
@@ -502,8 +504,8 @@ Creates a `DeadlineExceededError`.
502
504
Raised when a requested entity (e.g., a file or directory) was not found.
503
505
504
506
For example, running the
505
- [ ` tf.WholeFileReader.read() ` ] ( io_ops.md#WholeFileReader ) operation
506
- could raise ` NotFoundError ` if it receives the name of a file that
507
+ [ ` tf.WholeFileReader.read() ` ] ( ../../api_docs/python/ io_ops.md#WholeFileReader)
508
+ operation could raise ` NotFoundError ` if it receives the name of a file that
507
509
does not exist.
508
510
509
511
- - -
@@ -521,8 +523,8 @@ Creates a `NotFoundError`.
521
523
Raised when an entity that we attempted to create already exists.
522
524
523
525
For example, running an operation that saves a file
524
- (e.g. [ ` tf.train.Saver.save() ` ] ( train.md#Saver.save ) ) could
525
- potentially raise this exception if an explicit filename for an
526
+ (e.g. [ ` tf.train.Saver.save() ` ] ( ../../api_docs/python/ train.md#Saver.save) )
527
+ could potentially raise this exception if an explicit filename for an
526
528
existing file was passed.
527
529
528
530
- - -
@@ -540,8 +542,8 @@ Creates an `AlreadyExistsError`.
540
542
Raised when the caller does not have permission to run an operation.
541
543
542
544
For example, running the
543
- [ ` tf.WholeFileReader.read() ` ] ( io_ops.md#WholeFileReader ) operation
544
- could raise ` PermissionDeniedError ` if it receives the name of a
545
+ [ ` tf.WholeFileReader.read() ` ] ( ../../api_docs/python/ io_ops.md#WholeFileReader)
546
+ operation could raise ` PermissionDeniedError ` if it receives the name of a
545
547
file for which the user does not have the read file permission.
546
548
547
549
- - -
@@ -592,8 +594,8 @@ Creates a `ResourceExhaustedError`.
592
594
Operation was rejected because the system is not in a state to execute it.
593
595
594
596
This exception is most commonly raised when running an operation
595
- that reads a [ ` tf.Variable ` ] ( state_ops.md#Variable ) before it has
596
- been initialized.
597
+ that reads a [ ` tf.Variable ` ] ( ../../api_docs/python/ state_ops.md#Variable)
598
+ before it has been initialized.
597
599
598
600
- - -
599
601
@@ -609,9 +611,11 @@ Creates a `FailedPreconditionError`.
609
611
610
612
The operation was aborted, typically due to a concurrent action.
611
613
612
- For example, running a [ ` queue.enqueue() ` ] ( io_ops.md#QueueBase.enqueue )
614
+ For example, running a
615
+ [ ` queue.enqueue() ` ] ( ../../api_docs/python/io_ops.md#QueueBase.enqueue )
613
616
operation may raise ` AbortedError ` if a
614
- [ ` queue.close() ` ] ( io_ops.md#QueueBase.close ) operation previously ran.
617
+ [ ` queue.close() ` ] ( ../../api_docs/python/io_ops.md#QueueBase.close ) operation
618
+ previously ran.
615
619
616
620
- - -
617
621
@@ -628,9 +632,10 @@ Creates an `AbortedError`.
628
632
Raised when an operation executed past the valid range.
629
633
630
634
This exception is raised in "end-of-file" conditions, such as when a
631
- [ ` queue.dequeue() ` ] ( io_ops.md#QueueBase.dequeue ) operation is
632
- blocked on an empty queue, and a
633
- [ ` queue.close() ` ] ( io_ops.md#QueueBase.close ) operation executes.
635
+ [ ` queue.dequeue() ` ] ( ../../api_docs/python/io_ops.md#QueueBase.dequeue )
636
+ operation is blocked on an empty queue, and a
637
+ [ ` queue.close() ` ] ( ../../api_docs/python/io_ops.md#QueueBase.close )
638
+ operation executes.
634
639
635
640
- - -
636
641
@@ -648,9 +653,9 @@ Raised when an operation has not been implemented.
648
653
649
654
Some operations may raise this error when passed otherwise-valid
650
655
arguments that it does not currently support. For example, running
651
- the [ ` tf.nn.max_pool() ` ] ( nn.md#max_pool ) operation would raise this
652
- error if pooling was requested on the batch dimension, because this
653
- is not yet supported.
656
+ the [ ` tf.nn.max_pool() ` ] ( ../../api_docs/python/ nn.md#max_pool) operation
657
+ would raise this error if pooling was requested on the batch dimension,
658
+ because this is not yet supported.
654
659
655
660
- - -
656
661
@@ -700,8 +705,8 @@ Creates an `UnavailableError`.
700
705
Raised when unrecoverable data loss or corruption is encountered.
701
706
702
707
For example, this may be raised by running a
703
- [ ` tf.WholeFileReader.read() ` ] ( io_ops.md#WholeFileReader ) operation,
704
- if the file is truncated while it is being read.
708
+ [ ` tf.WholeFileReader.read() ` ] ( ../../api_docs/python/ io_ops.md#WholeFileReader)
709
+ operation, if the file is truncated while it is being read.
705
710
706
711
- - -
707
712
0 commit comments