Skip to content

Commit ca4cee0

Browse files
author
Vijay Vasudevan
committed
TensorFlow: Upstream latest commits to git.
Changes: - Updates to Documentation, README.md, installation instructions, anchor links, etc. - Adds Readme for embedding directory. Base CL: 107308461
1 parent 6ec6362 commit ca4cee0

File tree

21 files changed

+242
-94
lines changed

21 files changed

+242
-94
lines changed

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,21 @@ organization for the purposes of conducting machine learning and deep neural
1111
networks research. The system is general enough to be applicable in a wide
1212
variety of other domains, as well.
1313

14+
15+
**Note: Currently we do not accept pull requests on github -- see
16+
[CONTRIBUTING.md](CONTRIBUTING.md) for information on how to contribute code
17+
changes to TensorFlow through
18+
[tensorflow.googlesource.com](https://tensorflow.googlesource.com/tensorflow)**
19+
20+
**We use [github issues](https://github.com/tensorflow/tensorflow/issues) for
21+
tracking requests and bugs, but please see
22+
[Community](resources/index.md#community) for general questions and
23+
discussion.**
24+
1425
# Download and Setup
1526

16-
For detailed installation instructions, see
27+
To install TensorFlow using a binary package, see the instructions below. For
28+
more detailed installation instructions, including installing from source, see
1729
[here](tensorflow/g3doc/get_started/os_setup.md).
1830

1931
## Binary Installation
@@ -32,7 +44,8 @@ Install TensorFlow:
3244
# For CPU-only version
3345
$ sudo pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
3446

35-
# For GPU-enabled version
47+
# For GPU-enabled version. See detailed install instructions
48+
# for GPU configuration information.
3649
$ sudo pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
3750
```
3851

tensorflow/g3doc/api_docs/python/client.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
## Contents
66
* [Session management](#AUTOGENERATED-session-management)
77
* [class tf.Session](#Session)
8+
* [class tf.InteractiveSession](#InteractiveSession)
89
* [tf.get_default_session()](#get_default_session)
910
* [Error classes](#AUTOGENERATED-error-classes)
1011
* [class tf.OpError](#OpError)
@@ -257,6 +258,78 @@ thread's function.
257258

258259

259260

261+
- - -
262+
263+
### class tf.InteractiveSession <div class="md-anchor" id="InteractiveSession">{#InteractiveSession}</div>
264+
265+
A TensorFlow `Session` for use in interactive contexts, such as a shell.
266+
267+
The only difference with a regular `Session` is that an `InteractiveSession`
268+
installs itself as the default session on construction.
269+
The methods [`Tensor.eval()`](framework.md#Tensor.eval) and
270+
[`Operation.run()`](framework.md#Operation.run) will use that session
271+
to run ops.
272+
273+
This is convenient in interactive shells and [IPython
274+
notebooks](http://ipython.org), as it avoids having to pass an explicit
275+
`Session` object to run ops.
276+
277+
For example:
278+
279+
```python
280+
sess = tf.InteractiveSession()
281+
a = tf.constant(5.0)
282+
b = tf.constant(6.0)
283+
c = a * b
284+
# We can just use 'c.eval()' without passing 'sess'
285+
print c.eval()
286+
sess.close()
287+
```
288+
289+
Note that a regular session installs itself as the default session when it
290+
is created in a `with` statement. The common usage in non-interactive
291+
programs is to follow that pattern:
292+
293+
```python
294+
a = tf.constant(5.0)
295+
b = tf.constant(6.0)
296+
c = a * b
297+
with tf.Session():
298+
# We can also use 'c.eval()' here.
299+
print c.eval()
300+
```
301+
302+
- - -
303+
304+
#### tf.InteractiveSession.__init__(target='', graph=None) {#InteractiveSession.__init__}
305+
306+
Creates a new interactive TensorFlow session.
307+
308+
If no `graph` argument is specified when constructing the session,
309+
the default graph will be launched in the session. If you are
310+
using more than one graph (created with `tf.Graph()` in the same
311+
process, you will have to use different sessions for each graph,
312+
but each graph can be used in multiple sessions. In this case, it
313+
is often clearer to pass the graph to be launched explicitly to
314+
the session constructor.
315+
316+
##### Args:
317+
318+
319+
* <b>target</b>: (Optional.) The execution engine to connect to.
320+
Defaults to using an in-process engine. At present, no value
321+
other than the empty string is supported.
322+
* <b>graph</b>: (Optional.) The `Graph` to be launched (described above).
323+
324+
325+
- - -
326+
327+
#### tf.InteractiveSession.close() {#InteractiveSession.close}
328+
329+
Closes an `InteractiveSession`.
330+
331+
332+
260333

261334
- - -
262335

tensorflow/g3doc/api_docs/python/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@
299299
* [`DeadlineExceededError`](client.md#DeadlineExceededError)
300300
* [`FailedPreconditionError`](client.md#FailedPreconditionError)
301301
* [`get_default_session`](client.md#get_default_session)
302+
* [`InteractiveSession`](client.md#InteractiveSession)
302303
* [`InternalError`](client.md#InternalError)
303304
* [`InvalidArgumentError`](client.md#InvalidArgumentError)
304305
* [`NotFoundError`](client.md#NotFoundError)

tensorflow/g3doc/get_started/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ suggest skimming blue, then red.
5454

5555
<div style="width:100%; margin:auto; margin-bottom:10px; margin-top:20px; display: flex; flex-direction: row">
5656
<a href="../tutorials/mnist/beginners/index.md">
57-
<img style="flex-grow:1; flex-shrink:1;border: 1px solid black;" src="./blue_pill.png">
57+
<img style="flex-grow:1; flex-shrink:1; border: 1px solid black;" src="blue_pill.png">
5858
</a>
5959
<a href="../tutorials/mnist/pros/index.md">
60-
<img style="flex-grow:1; flex-shrink:1; border: 1px solid black;" src="./red_pill.png">
60+
<img style="flex-grow:1; flex-shrink:1; border: 1px solid black;" src="red_pill.png">
6161
</a>
6262
</div>
6363
<p style="font-size:10px;">Images licensed CC BY-SA 4.0; original by W. Carter</p>

tensorflow/g3doc/get_started/os_setup.md

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -88,35 +88,8 @@ ImportError: libcudart.so.7.0: cannot open shared object file: No such file or d
8888
you most likely need to set your `LD_LIBRARY_PATH` to point to the location of
8989
your CUDA libraries.
9090

91-
### Train the MNIST neural net model
92-
93-
```sh
94-
$ python tensorflow/models/image/mnist/convolutional.py
95-
Succesfully downloaded train-images-idx3-ubyte.gz 9912422 bytes.
96-
Succesfully downloaded train-labels-idx1-ubyte.gz 28881 bytes.
97-
Succesfully downloaded t10k-images-idx3-ubyte.gz 1648877 bytes.
98-
Succesfully downloaded t10k-labels-idx1-ubyte.gz 4542 bytes.
99-
Extracting data/train-images-idx3-ubyte.gz
100-
Extracting data/train-labels-idx1-ubyte.gz
101-
Extracting data/t10k-images-idx3-ubyte.gz
102-
Extracting data/t10k-labels-idx1-ubyte.gz
103-
can't determine number of CPU cores: assuming 4
104-
I tensorflow/core/common_runtime/local_device.cc:25] Local device intra op
105-
parallelism threads: 3
106-
can't determine number of CPU cores: assuming 4
107-
I tensorflow/core/common_runtime/local_session.cc:45] Local session inter op
108-
parallelism threads: 4
109-
Initialized!
110-
Epoch 0.00
111-
Minibatch loss: 12.054, learning rate: 0.010000
112-
Minibatch error: 90.6%
113-
Validation error: 84.6%
114-
...
115-
...
116-
117-
```
118-
119-
## Installing from sources {#source}
91+
<a name="source"></a>
92+
## Installing from sources
12093

12194
### Clone the TensorFlow repository
12295

@@ -260,7 +233,8 @@ Notes : You need to install
260233
Follow installation instructions [here](http://docs.scipy.org/doc/numpy/user/install.html).
261234

262235

263-
### Create the pip package and install {#create-pip}
236+
<a name="create-pip"></a>
237+
### Create the pip package and install
264238

265239
```sh
266240
$ bazel build -c opt //tensorflow/tools/pip_package:build_pip_package

tensorflow/g3doc/how_tos/adding_an_op/index.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Adding a New Op to TensorFlow
1+
# Adding a New Op
22

33
PREREQUISITES:
44

@@ -27,27 +27,28 @@ to:
2727

2828
<!-- TOC-BEGIN This section is generated by neural network: DO NOT EDIT! -->
2929
## Contents
30-
* [Define the Op's interface](#define_interface)
30+
* [Define the Op's interface](#AUTOGENERATED-define-the-op-s-interface)
3131
* [Implement the kernel for the Op](#AUTOGENERATED-implement-the-kernel-for-the-op)
3232
* [Generate the client wrapper](#AUTOGENERATED-generate-the-client-wrapper)
3333
* [The Python Op wrapper](#AUTOGENERATED-the-python-op-wrapper)
3434
* [The C++ Op wrapper](#AUTOGENERATED-the-c---op-wrapper)
3535
* [Verify it works](#AUTOGENERATED-verify-it-works)
36-
* [Validation](#validation)
36+
* [Validation](#AUTOGENERATED-validation)
3737
* [Op registration](#AUTOGENERATED-op-registration)
3838
* [Attrs](#AUTOGENERATED-attrs)
3939
* [Attr types](#AUTOGENERATED-attr-types)
40-
* [Polymorphism](#polymorphism)
40+
* [Polymorphism](#AUTOGENERATED-polymorphism)
4141
* [Inputs and Outputs](#AUTOGENERATED-inputs-and-outputs)
4242
* [Backwards compatibility](#AUTOGENERATED-backwards-compatibility)
43-
* [GPU Support](#mult-archs)
43+
* [GPU Support](#AUTOGENERATED-gpu-support)
4444
* [Implement the gradient in Python](#AUTOGENERATED-implement-the-gradient-in-python)
4545
* [Implement a shape function in Python](#AUTOGENERATED-implement-a-shape-function-in-python)
4646

4747

4848
<!-- TOC-END This section was generated by neural network, THANKS FOR READING! -->
4949

50-
## Define the Op's interface <div class="md-anchor" id="define_interface">{#define_interface}</div>
50+
<a name="define_interface"></a>
51+
## Define the Op's interface <div class="md-anchor" id="AUTOGENERATED-define-the-op-s-interface">{#AUTOGENERATED-define-the-op-s-interface}</div>
5152

5253
You define the interface of an Op by registering it with the TensorFlow system.
5354
In the registration, you specify the name of your Op, its inputs (types and
@@ -210,7 +211,7 @@ Then run your test:
210211
$ bazel test tensorflow/python:zero_out_op_test
211212
```
212213

213-
## Validation <div class="md-anchor" id="validation">{#validation}</div>
214+
## Validation <div class="md-anchor" id="AUTOGENERATED-validation">{#AUTOGENERATED-validation}</div>
214215

215216
The example above assumed that the Op applied to a tensor of any shape. What
216217
if it only applied to vectors? That means adding a check to the above OpKernel
@@ -445,8 +446,8 @@ REGISTER_OP("AttrDefaultExampleForAllTypes")
445446
Note in particular that the values of type `type` use [the `DT_*` names
446447
for the types](../../resources/dims_types.md#data-types).
447448
448-
### Polymorphism <div class="md-anchor" id="polymorphism">{#polymorphism}</div>
449-
#### Type Polymorphism {#type-polymorphism}
449+
### Polymorphism <div class="md-anchor" id="AUTOGENERATED-polymorphism">{#AUTOGENERATED-polymorphism}</div>
450+
#### Type Polymorphism
450451
451452
For ops that can take different types as input or produce different output
452453
types, you can specify [an attr](#attrs) in
@@ -466,7 +467,8 @@ REGISTER\_OP("ZeroOut")
466467
Your Op registration now specifies that the input's type must be `float`, or
467468
`int32`, and that its output will be the same type, since both have type `T`.
468469
469-
> A note on naming:{#naming} Inputs, outputs, and attrs generally should be
470+
<a name="naming"></a>
471+
> A note on naming: Inputs, outputs, and attrs generally should be
470472
> given snake_case names. The one exception is attrs that are used as the type
471473
> of an input or in the type of an input. Those attrs can be inferred when the
472474
> op is added to the graph and so don't appear in the op's function. For
@@ -482,7 +484,7 @@ Your Op registration now specifies that the input's type must be `float`, or
482484
> name: A name for the operation (optional).
483485
>
484486
> Returns:
485-
> A `Tensor`. Has the same type as `x`.
487+
> A `Tensor`. Has the same type as `to_zero`.
486488
> """
487489
> ```
488490
>
@@ -674,7 +676,8 @@ TF_CALL_REAL_NUMBER_TYPES(REGISTER_KERNEL);
674676
#undef REGISTER_KERNEL
675677
```
676678
677-
#### List Inputs and Outputs {#list-input-output}
679+
<a name="list-input-output"></a>
680+
#### List Inputs and Outputs
678681
679682
In addition to being able to accept or produce different types, ops can consume
680683
or produce a variable number of tensors.
@@ -894,7 +897,8 @@ There are several ways to preserve backwards-compatibility.
894897
If you cannot make your change to an operation backwards compatible, then
895898
create a new operation with a new name with the new semantics.
896899
897-
## GPU Support <div class="md-anchor" id="mult-archs">{#mult-archs}</div>
900+
<a name="mult-archs"></a>
901+
## GPU Support <div class="md-anchor" id="AUTOGENERATED-gpu-support">{#AUTOGENERATED-gpu-support}</div>
898902
899903
You can implement different OpKernels and register one for CPU and another for
900904
GPU, just like you can [register kernels for different types](#polymorphism).

tensorflow/g3doc/how_tos/graph_viz/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# TensorBoard: Visualizing Your Graph
1+
# TensorBoard: Graph Visualization
22

33
TensorFlow computation graphs are powerful but complicated. The graph visualization can help you understand and debug them. Here's an example of the visualization at work.
44

tensorflow/g3doc/how_tos/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ example.
1818
[View Tutorial](../tutorials/mnist/tf/index.md)
1919

2020

21-
## TensorBoard: Visualizing Your Training
21+
## TensorBoard: Visualizing Learning
2222

2323
TensorBoard is a useful tool for visualizing the training and evaluation of
2424
your model(s). This tutorial describes how to build and run TensorBoard as well
@@ -28,7 +28,7 @@ TensorBoard uses for display.
2828
[View Tutorial](summaries_and_tensorboard/index.md)
2929

3030

31-
## TensorBoard: Visualizing Your Graph
31+
## TensorBoard: Graph Visualization
3232

3333
This tutorial describes how to use the graph visualizer in TensorBoard to help
3434
you understand the dataflow graph and debug it.
@@ -60,15 +60,15 @@ compose in your graph, but here are the details of how to add you own custom Op.
6060
[View Tutorial](adding_an_op/index.md)
6161

6262

63-
## New Data Formats
63+
## Custom Data Readers
6464

6565
If you have a sizable custom data set, you may want to consider extending
6666
TensorFlow to read your data directly in it's native format. Here's how.
6767

6868
[View Tutorial](new_data_formats/index.md)
6969

7070

71-
## Using One or More GPUs
71+
## Using GPUs
7272

7373
This tutorial describes how to construct and execute models on GPU(s).
7474

tensorflow/g3doc/how_tos/new_data_formats/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Extending TF: Supporting new data formats
1+
# Custom Data Readers
22

33
PREREQUISITES:
44

tensorflow/g3doc/how_tos/reading_data/index.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ There are three main methods of getting data into a TensorFlow program:
1010

1111
<!-- TOC-BEGIN This section is generated by neural network: DO NOT EDIT! -->
1212
## Contents
13-
* [Feeding](#Feeding)
13+
* [Feeding](#AUTOGENERATED-feeding)
1414
* [Reading from files](#AUTOGENERATED-reading-from-files)
1515
* [Filenames, shuffling, and epoch limits](#AUTOGENERATED-filenames--shuffling--and-epoch-limits)
1616
* [File formats](#AUTOGENERATED-file-formats)
1717
* [Preprocessing](#AUTOGENERATED-preprocessing)
1818
* [Batching](#AUTOGENERATED-batching)
19-
* [Creating threads to prefetch using `QueueRunner` objects](#QueueRunner)
19+
* [Creating threads to prefetch using `QueueRunner` objects](#AUTOGENERATED-creating-threads-to-prefetch-using--queuerunner--objects)
2020
* [Filtering records or producing multiple examples per record](#AUTOGENERATED-filtering-records-or-producing-multiple-examples-per-record)
2121
* [Sparse input data](#AUTOGENERATED-sparse-input-data)
2222
* [Preloaded data](#AUTOGENERATED-preloaded-data)
@@ -25,7 +25,7 @@ There are three main methods of getting data into a TensorFlow program:
2525

2626
<!-- TOC-END This section was generated by neural network, THANKS FOR READING! -->
2727

28-
## Feeding <div class="md-anchor" id="Feeding">{#Feeding}</div>
28+
## Feeding <div class="md-anchor" id="AUTOGENERATED-feeding">{#AUTOGENERATED-feeding}</div>
2929

3030
TensorFlow's feed mechanism lets you inject data into any Tensor in a
3131
computation graph. A python computation can thus feed data directly into the
@@ -267,7 +267,8 @@ summary to the graph that indicates how full the example queue is. If you have
267267
enough reading threads, that summary will stay above zero. You can
268268
[view your summaries as training progresses using TensorBoard](../summaries_and_tensorboard/index.md).
269269

270-
### Creating threads to prefetch using `QueueRunner` objects <div class="md-anchor" id="QueueRunner">{#QueueRunner}</div>
270+
<a name="QueueRunner"></a>
271+
### Creating threads to prefetch using `QueueRunner` objects <div class="md-anchor" id="AUTOGENERATED-creating-threads-to-prefetch-using--queuerunner--objects">{#AUTOGENERATED-creating-threads-to-prefetch-using--queuerunner--objects}</div>
271272

272273
The short version: many of the `tf.train` functions listed above add
273274
[`QueueRunner`](../../api_docs/python/train.md#QueueRunner) objects to your

0 commit comments

Comments
 (0)