aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/examples
diff options
context:
space:
mode:
authorGravatar Sourabh Bajaj <sourabhbajaj@google.com>2018-01-17 13:14:48 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-01-17 13:18:49 -0800
commitd8697935d334bb0f2e1c9bccfe9a2a7bee9785cc (patch)
tree134cec2030a5e3fd3edef20e739c133c8940f257 /tensorflow/examples
parent7699ea8bee2ee9d0d5c93706cf1357a36c60ef58 (diff)
Merge changes from github.
PiperOrigin-RevId: 182258809
Diffstat (limited to 'tensorflow/examples')
-rw-r--r--tensorflow/examples/label_image/BUILD10
-rw-r--r--tensorflow/examples/label_image/README.md15
2 files changed, 24 insertions, 1 deletions
diff --git a/tensorflow/examples/label_image/BUILD b/tensorflow/examples/label_image/BUILD
index 9207fc6332..2abbe9dacc 100644
--- a/tensorflow/examples/label_image/BUILD
+++ b/tensorflow/examples/label_image/BUILD
@@ -51,6 +51,16 @@ tf_cc_binary(
}),
)
+py_binary(
+ name = "label_image_py",
+ srcs = ["label_image.py"],
+ main = "label_image.py",
+ srcs_version = "PY2AND3",
+ deps = [
+ "//tensorflow:tensorflow_py",
+ ],
+)
+
filegroup(
name = "all_files",
srcs = glob(
diff --git a/tensorflow/examples/label_image/README.md b/tensorflow/examples/label_image/README.md
index a9e44745e5..cfd0132a7a 100644
--- a/tensorflow/examples/label_image/README.md
+++ b/tensorflow/examples/label_image/README.md
@@ -73,10 +73,23 @@ Python than the Python code mentioned in the
[Inception tutorial](https://www.tensorflow.org/tutorials/image_recognition/).
and could be easier to add visualization or debug code.
-With tensorflow python package installed, you can run it like:
+
+`bazel-bin/tensorflow/examples/label_image/label_image_py` should be there after
+```bash
+$ bazel build tensorflow/examples/label_image/...
+```
+
+Run
+
+```bash
+$ bazel-bin/tensorflow/examples/label_image/label_image_py
+```
+
+Or, with tensorflow python package installed, you can run it like:
```bash
$ python3 tensorflow/examples/label_image/label_image.py
```
+
And get result similar to this:
```
military uniform 0.834305