aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/examples/label_image
diff options
context:
space:
mode:
authorGravatar Vijay Vasudevan <vrv@google.com>2015-12-06 14:53:28 -0800
committerGravatar Vijay Vasudevan <vrv@google.com>2015-12-06 14:53:28 -0800
commitf9d3e9d03c69bfac77a2fe1ad80f7c5aa517e0f0 (patch)
tree52302a06eae969c8f4e1d7af6749a85fe0ac4eb1 /tensorflow/examples/label_image
parent40d0d2904e8e00d3c4bf43fa62130eeebceef147 (diff)
TensorFlow: upstream latest changes to git.
Change 109537918 TensorFlow pip setup: wheel >= 0.26 for python3 pip install Change 109505848 Fix distortion default value to 1.0 in fixed_unigram_candidate_sampler. This means we default to the actual provided unigram distribution, instead of to the uniform (as it is currently). Change 109470494 Bugfix in gradients calculation when the ys rely on each other. Change 109467619 Fix CIFAR-10 model to train on all the training data instead of just 80% of it. Fixes #396. Change 109467557 Replaced checkpoint file with binary GraphDef. Change 109467433 Updates to C++ tutorial section. Change 109465269 TensorFlow: update documentation for tutorials to not assume use of bazel (when possible). Change 109462916 A tutorial for image recognition to coincide with the release of the latest Inception image classification model. Change 109462342 Clear control dependencies in variable_scope.get_variable() when creating ops for the initializer. Add tests of various error conditions. Change 109461981 Various performance improvements in low-level node execution code paths. Speeds up ptb_word_lm on my desktop with a Titan X from 3638 words per second to 3751 words per second (3.1% speedup). Changes include: o Avoided many strcmp operations per node execution and extra touches of cache lines in executor.cc, by making all the various IsMerge, IsSwitch, IsSend, etc. operations instead be based on an internal enum value that is pre-computed at Node construction time, rather than doing string comparisons against node->type_string(). We were doing about 6 such comparisons per executed node. o Removed mutex_lock in executor.cc in ExecutorState::Process. The lock was not needed and the comment about the iterations array being potentially resized is not true (the iterations arrays are created with a fixed size). Checked with yuanbyu to confirm this. o Added new two-argument port::Tracing::ScopedAnnotation constructor that takes two StringPiece arguments, and only concatenates them lazily if tracing is enabled. Also changed the code in platform/tracing.{h,cc} so that the ScopedAnnotation constructor and the TraceMe constructor can be inlined. o In BaseGPUDevice::Compute, used the two-argument ScopedAnnotation constructor to avoid doing StrCat(opkernel->name(), ":", op_kernel->type_string()) on every node execution on a GPU. o Introduced a new TensorReference class that just holds a reference to an underlying TensorBuffer, and requires an explicit Unref(). o Changed the EventMgr interface to take a vector of TensorReference objects for EventMgr::ThenDeleteTensors, rather than a vector of Tensor objects. o Used TensorReference in a few places in gpu_util.cc o Minor: switched to using InlinedVectors in a few places to get better cache locality. Change 109456692 Updated the label_image example to use the latest Inception model Change 109456545 Provides classify_image which performs image recognition on a 1000 object label set. $ ./classify_image giant panda, panda, panda bear, coon bear, Ailuropoda melanoleuca (score = 0.88493) indri, indris, Indri indri, Indri brevicaudatus (score = 0.00878) lesser panda, red panda, panda, bear cat, cat bear, Ailurus fulgens (score = 0.00317) custard apple (score = 0.00149) earthstar (score = 0.00127) Change 109455002 TensorFlow: make the helper libraries for various models available in the pip package so that when users type: python translate.py ... the absolute import works. This change is supposed to help make our tutorials run without the *need* to use bazel. Change 109450041 TensorFlow: remove cifar and convolutional binary copies from pip install. Adds embedding and some other models to the list. Change 109448520 Move the description of a failing invariant from a comment into the dcheck-fail message text. Change 109447577 TensorBoard has release tagging (tensorboard/TAG) Also track TensorBoard changes (tensorboard/CHANGES) Change 109444161 Added ParseSingleSequenceExample + python wrappers + unit tests. Change 109440864 Update all the TensorFlow Dockerfiles, and simplify GPU containers. This change updates all four of our Dockerfiles to match the targets discussed in https://github.com/tensorflow/tensorflow/issues/149. The most notable change here is moving the GPU images to use the NVidia containers which include cudnn and other build-time dependencies, dramatically simplifying both the build and run steps. A description of which tags exist and get pushed where will be in a follow-up. Change 109432591 Some pylint and pydoc changes in saver. Change 109430127 Remove unused hydrogen components Change 109419354 The RNN api, although moved into python/ops/, remains undocumented. It may still change at any time. Base CL: 109538006
Diffstat (limited to 'tensorflow/examples/label_image')
-rw-r--r--tensorflow/examples/label_image/README.md7
-rw-r--r--tensorflow/examples/label_image/main.cc12
2 files changed, 11 insertions, 8 deletions
diff --git a/tensorflow/examples/label_image/README.md b/tensorflow/examples/label_image/README.md
index ef0825faaf..c24ce19f7f 100644
--- a/tensorflow/examples/label_image/README.md
+++ b/tensorflow/examples/label_image/README.md
@@ -15,9 +15,9 @@ is not packaged in the repo because of its size. Instead, you must
first download the file to the `data` directory in the source tree:
```bash
-$ wget https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip -O tensorflow/examples/label_image/data/inception5h.zip
+$ wget https://storage.googleapis.com/download.tensorflow.org/models/inception_dec_2015.zip -O tensorflow/examples/label_image/data/inception_dec_2015.zip
-$ unzip tensorflow/examples/label_image/data/inception5h.zip -d tensorflow/examples/label_image/data/
+$ unzip tensorflow/examples/label_image/data/inception_dec_2015.zip -d tensorflow/examples/label_image/data/
```
Then, as long as you've managed to build the main TensorFlow framework, you
@@ -58,3 +58,6 @@ Next, try it out on your own images by supplying the --image= argument, e.g.
```bash
$ bazel-bin/tensorflow/examples/label_image/label_image --image=my_image.png
```
+
+For a more detailed look at this code, you can check out the C++ section of the
+[Inception tutorial](https://tensorflow.org/tutorials/image_recognition/).
diff --git a/tensorflow/examples/label_image/main.cc b/tensorflow/examples/label_image/main.cc
index 9cff418c67..a5f14e4d6f 100644
--- a/tensorflow/examples/label_image/main.cc
+++ b/tensorflow/examples/label_image/main.cc
@@ -73,12 +73,12 @@ TF_DEFINE_string(labels,
"imagenet_comp_graph_label_strings.txt",
"A text file containing the labels of all the categories, one"
" per line.");
-TF_DEFINE_int32(input_width, 224, "Width of the image the network expects.");
-TF_DEFINE_int32(input_height, 224, "Height of the image the network expects.");
-TF_DEFINE_int32(input_mean, 117, "How much to subtract from input values.");
-TF_DEFINE_int32(input_std, 1, "What to divide the input values by.");
-TF_DEFINE_string(input_layer, "input", "The name of the input node.");
-TF_DEFINE_string(output_layer, "softmax2", "The name of the output node.");
+TF_DEFINE_int32(input_width, 299, "Width of the image the network expects.");
+TF_DEFINE_int32(input_height, 299, "Height of the image the network expects.");
+TF_DEFINE_int32(input_mean, 128, "How much to subtract from input values.");
+TF_DEFINE_int32(input_std, 128, "What to divide the input values by.");
+TF_DEFINE_string(input_layer, "Mul", "The name of the input node.");
+TF_DEFINE_string(output_layer, "softmax", "The name of the output node.");
TF_DEFINE_bool(self_test, false, "Whether to run a sanity check on the results.");
TF_DEFINE_string(root_dir, "", "The directory at the root of the data files.");