aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-framework/tensorflow/files/0001-label_image-tweak-default-model-location.patch
blob: e2432db485c8239959a24d399c8693184cf1fd0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From 14cbd9b4740b9fcb4552a9c2160be04040415987 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Mon, 25 Feb 2019 00:54:21 -0500
Subject: [PATCH] label_image: tweak default model location

Upstream-Status: Inappropriate [oe specific]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 tensorflow/examples/label_image/label_image.py | 6 +++---
 tensorflow/examples/label_image/main.cc        | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tensorflow/examples/label_image/label_image.py b/tensorflow/examples/label_image/label_image.py
index fe5e0fc..55e344a 100644
--- a/tensorflow/examples/label_image/label_image.py
+++ b/tensorflow/examples/label_image/label_image.py
@@ -73,10 +73,10 @@ def load_labels(label_file):
 
 
 if __name__ == "__main__":
-  file_name = "tensorflow/examples/label_image/data/grace_hopper.jpg"
+  file_name = "/usr/share/label_image/grace_hopper.jpg"
   model_file = \
-    "tensorflow/examples/label_image/data/inception_v3_2016_08_28_frozen.pb"
-  label_file = "tensorflow/examples/label_image/data/imagenet_slim_labels.txt"
+    "/usr/share/label_image/inception_v3_2016_08_28_frozen.pb"
+  label_file = "/usr/share/label_image/imagenet_slim_labels.txt"
   input_height = 299
   input_width = 299
   input_mean = 0
diff --git a/tensorflow/examples/label_image/main.cc b/tensorflow/examples/label_image/main.cc
index ee2927d..2c59370 100644
--- a/tensorflow/examples/label_image/main.cc
+++ b/tensorflow/examples/label_image/main.cc
@@ -278,11 +278,11 @@ int main(int argc, char* argv[]) {
   // They define where the graph and input data is located, and what kind of
   // input the model expects. If you train your own model, or use something
   // other than inception_v3, then you'll need to update these.
-  string image = "tensorflow/examples/label_image/data/grace_hopper.jpg";
+  string image = "/usr/share/label_image/grace_hopper.jpg";
   string graph =
-      "tensorflow/examples/label_image/data/inception_v3_2016_08_28_frozen.pb";
+      "/usr/share/label_image/inception_v3_2016_08_28_frozen.pb";
   string labels =
-      "tensorflow/examples/label_image/data/imagenet_slim_labels.txt";
+      "/usr/share/label_image/imagenet_slim_labels.txt";
   int32 input_width = 299;
   int32 input_height = 299;
   float input_mean = 0;
-- 
2.8.1