diff options
author | 2015-12-03 10:26:25 -0800 | |
---|---|---|
committer | 2015-12-03 10:26:25 -0800 | |
commit | a4806a3fba7c00bea3e7022477339b2d09539751 (patch) | |
tree | 76014083c9c02262cb9cda146de9512b2939eefa /tensorflow/g3doc/tutorials | |
parent | bb7a7a8858dc18ba733ed64e0733e27a4224ece8 (diff) |
TensorFlow: upstream changes to git.
Change 109321497
Move all images to images directory to make docs versioning easier
- adjust all paths in the docs to point to the new locations
- remove some now redundant section-order tags added for the old website
Change 109317807
Added a kernel op to compute the eigendecomposition of a self-adjoint matrix.
Added a new kernel op called self_adjoint_eig (and a batch_self_adjoint_eig) that
computes the eigendecomposition of a self-adjoint matrix. The return value is
the concatenation of the eigenvalues as a row vector, and the eigenvectors.
Change 109310773
Change `_read32()` in the MNIST input example to return an int.
Currently we return a 1-D numpy array with 1 element. Numpy has
recently deprecated the ability to treat this as a scalar, and as a
result this tutorial fails. The fix returns the 0th element of the
array instead.
Change 109301269
Re-arrange TensorBoard demo files.
Change 109273589
add ci_build for ci.tensorflow.org
Change 109260293
Speed up NodeDef -> OpKernel process by not spending time generating
an error message for missing "_kernel" attr that will be thrown away.
Change 109257179
TensorFlow:make event_file_loader_test hermetic by using tempfile
instead of fixed filenames. Without this change, running
event_file_loader_test twice in the same client (locally)
causes it to fail, because it writes into the same file and appends
another event, instead of starting from scratch.
Change 109256464
Minor cleanup in TensorBoard server code
Change 109255382
Change to reduce critical section times in gpu_event_mgr.h:
(1) Call stream->ThenRecordEvent outside the EventMgr critical section
(2) Do memory deallocation outside the critical section
Speeds up one configuration of ptb_word_lm from 2924 words per
second (wps) to 3278 wps on my desktop machine with a Titan X.
Change 109254843
Fix use of uninitialized memory in test.
Change 109250995
python_config.sh needs a license header
Otherwise the license test fails.
Change 109249914
add ci_build for ci.tensorflow.org
Change 109249397
Fixes reduce_sum (complex) on GPU segfaults.
Fixes #357
Change 109245652
add ci_build for ci.tensorflow.org
Base CL: 109321563
Diffstat (limited to 'tensorflow/g3doc/tutorials')
-rw-r--r-- | tensorflow/g3doc/tutorials/deep_cnn/index.md | 16 | ||||
-rw-r--r-- | tensorflow/g3doc/tutorials/index.md | 16 | ||||
-rwxr-xr-x | tensorflow/g3doc/tutorials/mandelbrot/index.md | 2 | ||||
-rw-r--r-- | tensorflow/g3doc/tutorials/mnist/beginners/index.md | 18 | ||||
-rw-r--r-- | tensorflow/g3doc/tutorials/mnist/download/index.md | 2 | ||||
-rw-r--r-- | tensorflow/g3doc/tutorials/mnist/input_data.py | 2 | ||||
-rw-r--r-- | tensorflow/g3doc/tutorials/mnist/pros/index.md | 2 | ||||
-rw-r--r-- | tensorflow/g3doc/tutorials/mnist/tf/index.md | 6 | ||||
-rwxr-xr-x | tensorflow/g3doc/tutorials/pdes/index.md | 4 | ||||
-rw-r--r-- | tensorflow/g3doc/tutorials/seq2seq/index.md | 4 | ||||
-rw-r--r-- | tensorflow/g3doc/tutorials/word2vec/index.md | 10 |
11 files changed, 33 insertions, 49 deletions
diff --git a/tensorflow/g3doc/tutorials/deep_cnn/index.md b/tensorflow/g3doc/tutorials/deep_cnn/index.md index 59d106680e..66614d402f 100644 --- a/tensorflow/g3doc/tutorials/deep_cnn/index.md +++ b/tensorflow/g3doc/tutorials/deep_cnn/index.md @@ -9,7 +9,7 @@ CIFAR-10 classification is a common benchmark problem in machine learning. The problem is to classify RGB 32x32 pixel images across 10 categories: ```airplane, automobile, bird, cat, deer, dog, frog, horse, ship, and truck.``` -![CIFAR-10 Samples](./cifar_samples.png "CIFAR-10 Samples, from http://www.cs.toronto.edu/~kriz/cifar.html") +![CIFAR-10 Samples](../../images/cifar_samples.png "CIFAR-10 Samples, from http://www.cs.toronto.edu/~kriz/cifar.html") For more details refer to the [CIFAR-10 page](http://www.cs.toronto.edu/~kriz/cifar.html) and a [Tech Report](http://www.cs.toronto.edu/~kriz/learning-features-2009-TR.pdf) @@ -135,7 +135,7 @@ so that we may visualize them in TensorBoard. This is a good practice to verify that inputs are built correctly. <div style="width:50%; margin:auto; margin-bottom:10px; margin-top:20px;"> - <img style="width:70%" src="./cifar_image_summary.png"> + <img style="width:70%" src="../../images/cifar_image_summary.png"> </div> Reading images from disk and distorting them can use a non-trivial amount of @@ -164,7 +164,7 @@ Layer Name | Description Here is a graph generated from TensorBoard describing the inference operation: <div style="width:15%; margin:auto; margin-bottom:10px; margin-top:20px;"> - <img style="width:100%" src="./cifar_graph.png"> + <img style="width:100%" src="../../images/cifar_graph.png"> </div> > **EXERCISE**: The output of `inference` are un-normalized logits. Try editing @@ -199,7 +199,7 @@ 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") +![CIFAR-10 Loss](../../images/cifar_loss.png "CIFAR-10 Total Loss") We train the model using standard [gradient descent](https://en.wikipedia.org/wiki/Gradient_descent) @@ -208,7 +208,7 @@ with a learning rate that [exponentially decays](../../api_docs/python/train.md#exponential_decay) over time. -![CIFAR-10 Learning Rate Decay](./cifar_lr_decay.png "CIFAR-10 Learning Rate Decay") +![CIFAR-10 Learning Rate Decay](../../images/cifar_lr_decay.png "CIFAR-10 Learning Rate Decay") The `train()` function adds the operations needed to minimize the objective by calculating the gradient and updating the learned variables (see @@ -289,8 +289,8 @@ For instance, we can watch how the distribution of activations and degree of sparsity in `local3` features evolve during training: <div style="width:100%; margin:auto; margin-bottom:10px; margin-top:20px; display: flex; flex-direction: row"> - <img style="flex-grow:1; flex-shrink:1;" src="./cifar_sparsity.png"> - <img style="flex-grow:1; flex-shrink:1;" src="./cifar_activations.png"> + <img style="flex-grow:1; flex-shrink:1;" src="../../images/cifar_sparsity.png"> + <img style="flex-grow:1; flex-shrink:1;" src="../../images/cifar_activations.png"> </div> Individual loss functions, as well as the total loss, are particularly @@ -372,7 +372,7 @@ processing a batch of data. Here is a diagram of this model: <div style="width:40%; margin:auto; margin-bottom:10px; margin-top:20px;"> - <img style="width:100%" src="./Parallelism.png"> + <img style="width:100%" src="../../images/Parallelism.png"> </div> Note that each GPU computes inference as well as the gradients for a unique diff --git a/tensorflow/g3doc/tutorials/index.md b/tensorflow/g3doc/tutorials/index.md index 84215c72f1..ee22806f69 100644 --- a/tensorflow/g3doc/tutorials/index.md +++ b/tensorflow/g3doc/tutorials/index.md @@ -107,19 +107,3 @@ visual hallucination software. COMING SOON -<div class='sections-order' style="display: none;"> -<!-- -<!-- mnist/beginners/index.md --> -<!-- mnist/pros/index.md --> -<!-- mnist/tf/index.md --> -<!-- deep_cnn/index.md --> -<!-- word2vec/index.md --> -<!-- recurrent/index.md --> -<!-- seq2seq/index.md --> -<!-- mandelbrot/index.md --> -<!-- pdes/index.md --> -<!-- mnist/download/index.md --> ---> -</div> - - diff --git a/tensorflow/g3doc/tutorials/mandelbrot/index.md b/tensorflow/g3doc/tutorials/mandelbrot/index.md index ee8a95d12b..d88e7b5502 100755 --- a/tensorflow/g3doc/tutorials/mandelbrot/index.md +++ b/tensorflow/g3doc/tutorials/mandelbrot/index.md @@ -110,7 +110,7 @@ Let's see what we've got. DisplayFractal(ns.eval()) ``` -![jpeg](mandelbrot_output.jpg) +![jpeg](../../images/mandelbrot_output.jpg) Not bad! diff --git a/tensorflow/g3doc/tutorials/mnist/beginners/index.md b/tensorflow/g3doc/tutorials/mnist/beginners/index.md index 569cbef9e9..99453d065d 100644 --- a/tensorflow/g3doc/tutorials/mnist/beginners/index.md +++ b/tensorflow/g3doc/tutorials/mnist/beginners/index.md @@ -3,7 +3,7 @@ *This tutorial is intended for readers who are new to both machine learning and TensorFlow. If you already know what MNIST is, and what softmax (multinomial logistic) regression is, -you might prefer this [faster paced tutorial](../../../tutorials/mnist/pros/index.md).* +you might prefer this [faster paced tutorial](../pros/index.md).* When one learns how to program, there's a tradition that the first thing you do is print "Hello World." Just like programming has Hello World, machine learning @@ -13,7 +13,7 @@ MNIST is a simple computer vision dataset. It consists of images of handwritten digits like these: <div style="width:40%; margin:auto; margin-bottom:10px; margin-top:20px;"> -<img style="width:100%" src="img/MNIST.png"> +<img style="width:100%" src="../../../images/MNIST.png"> </div> It also includes labels for each image, telling us which digit it is. For @@ -61,7 +61,7 @@ Each image is 28 pixels by 28 pixels. We can interpret this as a big array of numbers: <div style="width:50%; margin:auto; margin-bottom:10px; margin-top:20px;"> -<img style="width:100%" src="img/MNIST-Matrix.png"> +<img style="width:100%" src="../../../images/MNIST-Matrix.png"> </div> We can flatten this array into a vector of 28x28 = 784 numbers. It doesn't @@ -83,7 +83,7 @@ the pixel intensity between 0 and 1, for a particular pixel in a particular image. <div style="width:40%; margin:auto; margin-bottom:10px; margin-top:20px;"> -<img style="width:100%" src="img/mnist-train-xs.png"> +<img style="width:100%" src="../../../images/mnist-train-xs.png"> </div> The corresponding labels in MNIST are numbers between 0 and 9, describing @@ -97,7 +97,7 @@ Consequently, `mnist.train.labels` is a `[55000, 10]` array of floats. <div style="width:40%; margin:auto; margin-bottom:10px; margin-top:20px;"> -<img style="width:100%" src="img/mnist-train-ys.png"> +<img style="width:100%" src="../../../images/mnist-train-ys.png"> </div> We're now ready to actually make our model! @@ -128,7 +128,7 @@ classes. Red represents negative weights, while blue represents positive weights. <div style="width:40%; margin:auto; margin-bottom:10px; margin-top:20px;"> -<img style="width:100%" src="img/softmax-weights.png"> +<img style="width:100%" src="../../../images/softmax-weights.png"> </div> We also add some extra evidence called a bias. Basically, we want to be able @@ -175,13 +175,13 @@ although with a lot more \\(x\\)s. For each output, we compute a weighted sum of the \\(x\\)s, add a bias, and then apply softmax. <div style="width:55%; margin:auto; margin-bottom:10px; margin-top:20px;"> -<img style="width:100%" src="img/softmax-regression-scalargraph.png"> +<img style="width:100%" src="../../../images/softmax-regression-scalargraph.png"> </div> If we write that out as equations, we get: <div style="width:52%; margin-left:25%; margin-bottom:10px; margin-top:20px;"> -<img style="width:100%" src="img/softmax-regression-scalarequation.png"> +<img style="width:100%" src="../../../images/softmax-regression-scalarequation.png"> </div> We can "vectorize" this procedure, turning it into a matrix multiplication @@ -189,7 +189,7 @@ and vector addition. This is helpful for computational efficiency. (It's also a useful way to think.) <div style="width:50%; margin:auto; margin-bottom:10px; margin-top:20px;"> -<img style="width:100%" src="img/softmax-regression-vectorequation.png"> +<img style="width:100%" src="../../../images/softmax-regression-vectorequation.png"> </div> More compactly, we can just write: diff --git a/tensorflow/g3doc/tutorials/mnist/download/index.md b/tensorflow/g3doc/tutorials/mnist/download/index.md index 70e6e37ef6..3cb9528f34 100644 --- a/tensorflow/g3doc/tutorials/mnist/download/index.md +++ b/tensorflow/g3doc/tutorials/mnist/download/index.md @@ -19,7 +19,7 @@ MNIST is a classic problem in machine learning. The problem is to look at greyscale 28x28 pixel images of handwritten digits and determine which digit the image represents, for all the digits from zero to nine. -![MNIST Digits](../tf/mnist_digits.png "MNIST Digits") +![MNIST Digits](../../../images/mnist_digits.png "MNIST Digits") For more information, refer to [Yann LeCun's MNIST page](http://yann.lecun.com/exdb/mnist/) or [Chris Olah's visualizations of MNIST](http://colah.github.io/posts/2014-10-Visualizing-MNIST/). diff --git a/tensorflow/g3doc/tutorials/mnist/input_data.py b/tensorflow/g3doc/tutorials/mnist/input_data.py index 3078137f2e..ae3727c82e 100644 --- a/tensorflow/g3doc/tutorials/mnist/input_data.py +++ b/tensorflow/g3doc/tutorials/mnist/input_data.py @@ -42,7 +42,7 @@ def maybe_download(filename, work_directory): def _read32(bytestream): dt = numpy.dtype(numpy.uint32).newbyteorder('>') - return numpy.frombuffer(bytestream.read(4), dtype=dt) + return numpy.frombuffer(bytestream.read(4), dtype=dt)[0] def extract_images(filename): diff --git a/tensorflow/g3doc/tutorials/mnist/pros/index.md b/tensorflow/g3doc/tutorials/mnist/pros/index.md index 6df9e430a3..4d8b5e84bd 100644 --- a/tensorflow/g3doc/tutorials/mnist/pros/index.md +++ b/tensorflow/g3doc/tutorials/mnist/pros/index.md @@ -9,7 +9,7 @@ while constructing a deep convolutional MNIST classifier. *This introduction assumes familiarity with neural networks and the MNIST dataset. If you don't have a background with them, check out the -[introduction for beginners](../../../tutorials/mnist/beginners/index.md).* +[introduction for beginners](../beginners/index.md).* ## Setup diff --git a/tensorflow/g3doc/tutorials/mnist/tf/index.md b/tensorflow/g3doc/tutorials/mnist/tf/index.md index f7cd3b527c..373b8968c5 100644 --- a/tensorflow/g3doc/tutorials/mnist/tf/index.md +++ b/tensorflow/g3doc/tutorials/mnist/tf/index.md @@ -31,7 +31,7 @@ MNIST is a classic problem in machine learning. The problem is to look at greyscale 28x28 pixel images of handwritten digits and determine which digit the image represents, for all the digits from zero to nine. -![MNIST Digits](./mnist_digits.png "MNIST Digits") +![MNIST Digits](../../../images/mnist_digits.png "MNIST Digits") For more information, refer to [Yann LeCun's MNIST page](http://yann.lecun.com/exdb/mnist/) or [Chris Olah's visualizations of MNIST](http://colah.github.io/posts/2014-10-Visualizing-MNIST/). @@ -90,7 +90,7 @@ loss. and apply gradients. <div style="width:95%; margin:auto; margin-bottom:10px; margin-top:20px;"> - <img style="width:100%" src="./mnist_subgraph.png"> + <img style="width:100%" src="../../../images/mnist_subgraph.png"> </div> ### Inference @@ -401,7 +401,7 @@ summary_writer.add_summary(summary_str, step) When the events files are written, TensorBoard may be run against the training folder to display the values from the summaries. -![MNIST TensorBoard](./mnist_tensorboard.png "MNIST TensorBoard") +![MNIST TensorBoard](../../../images/mnist_tensorboard.png "MNIST TensorBoard") **NOTE**: For more info about how to build and run Tensorboard, please see the accompanying tutorial [Tensorboard: Visualizing Your Training](../../../how_tos/summaries_and_tensorboard/index.md). diff --git a/tensorflow/g3doc/tutorials/pdes/index.md b/tensorflow/g3doc/tutorials/pdes/index.md index ca6f84985e..9d922320cb 100755 --- a/tensorflow/g3doc/tutorials/pdes/index.md +++ b/tensorflow/g3doc/tutorials/pdes/index.md @@ -92,7 +92,7 @@ for n in range(40): DisplayArray(u_init, rng=[-0.1, 0.1]) ``` -![jpeg](pde_output_1.jpg) +![jpeg](../../images/pde_output_1.jpg) Now let's specify the details of the differential equation. @@ -137,7 +137,7 @@ for i in range(1000): DisplayArray(U.eval(), rng=[-0.1, 0.1]) ``` -![jpeg](pde_output_2.jpg) +![jpeg](../../images/pde_output_2.jpg) Look! Ripples! diff --git a/tensorflow/g3doc/tutorials/seq2seq/index.md b/tensorflow/g3doc/tutorials/seq2seq/index.md index 6cbbf6a3bd..63542dc6ba 100644 --- a/tensorflow/g3doc/tutorials/seq2seq/index.md +++ b/tensorflow/g3doc/tutorials/seq2seq/index.md @@ -41,7 +41,7 @@ processes the input and a *decoder* that generates the output. This basic architecture is depicted below. <div style="width:80%; margin:auto; margin-bottom:10px; margin-top:20px;"> -<img style="width:100%" src="basic_seq2seq.png" /> +<img style="width:100%" src="../../images/basic_seq2seq.png" /> </div> Each box in the picture above represents a cell of the RNN, most commonly @@ -61,7 +61,7 @@ decoding step. A multi-layer sequence-to-sequence network with LSTM cells and attention mechanism in the decoder looks like this. <div style="width:80%; margin:auto; margin-bottom:10px; margin-top:20px;"> -<img style="width:100%" src="attention_seq2seq.png" /> +<img style="width:100%" src="../../images/attention_seq2seq.png" /> </div> ## TensorFlow seq2seq Library diff --git a/tensorflow/g3doc/tutorials/word2vec/index.md b/tensorflow/g3doc/tutorials/word2vec/index.md index 3dc632c1bc..f026d8c5b5 100644 --- a/tensorflow/g3doc/tutorials/word2vec/index.md +++ b/tensorflow/g3doc/tutorials/word2vec/index.md @@ -51,7 +51,7 @@ means that we may need more data in order to successfully train statistical models. Using vector representations can overcome some of these obstacles. <div style="width:100%; margin:auto; margin-bottom:10px; margin-top:20px;"> -<img style="width:100%" src="img/audio-image-text.png" alt> +<img style="width:100%" src="../../images/audio-image-text.png" alt> </div> [Vector space models](https://en.wikipedia.org/wiki/Vector_space_model) (VSMs) @@ -124,7 +124,7 @@ probability using the score for all other \\(V\\) words \\(w'\\) in the current context \\(h\\), *at every training step*. <div style="width:60%; margin:auto; margin-bottom:10px; margin-top:20px;"> -<img style="width:100%" src="img/softmax-nplm.png" alt> +<img style="width:100%" src="../../images/softmax-nplm.png" alt> </div> On the other hand, for feature learning in word2vec we do not need a full @@ -135,7 +135,7 @@ same context. We illustrate this below for a CBOW model. For skip-gram the direction is simply inverted. <div style="width:60%; margin:auto; margin-bottom:10px; margin-top:20px;"> -<img style="width:100%" src="img/nce-nplm.png" alt> +<img style="width:100%" src="../../images/nce-nplm.png" alt> </div> Mathematically, the objective (for each example) is to maximize @@ -232,7 +232,7 @@ below (see also for example [Mikolov et al., 2013](http://www.aclweb.org/anthology/N13-1090)). <div style="width:100%; margin:auto; margin-bottom:10px; margin-top:20px;"> -<img style="width:100%" src="img/linear-relationships.png" alt> +<img style="width:100%" src="../../images/linear-relationships.png" alt> </div> This explains why these vectors are also useful as features for many canonical @@ -329,7 +329,7 @@ After training has finished we can visualize the learned embeddings using t-SNE. <div style="width:100%; margin:auto; margin-bottom:10px; margin-top:20px;"> -<img style="width:100%" src="img/tsne.png" alt> +<img style="width:100%" src="../../images/tsne.png" alt> </div> Et voila! As expected, words that are similar end up clustering nearby each |