[res] TF Shape-Reshape network (#6343)
author박천교/On-Device Lab(SR)/Engineer/삼성전자 <ch.bahk@samsung.com>
Thu, 8 Aug 2019 02:45:27 +0000 (11:45 +0900)
committer박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Thu, 8 Aug 2019 02:45:27 +0000 (11:45 +0900)
This commit adds tensorflow Shape test using Reshape node.

Signed-off-by: Cheongyo Bahk <ch.bahk@samsung.com>
res/TensorFlowTests/TF_SMALL_NET_0013/test.info [new file with mode: 0644]
res/TensorFlowTests/TF_SMALL_NET_0013/test.pbtxt [new file with mode: 0644]

diff --git a/res/TensorFlowTests/TF_SMALL_NET_0013/test.info b/res/TensorFlowTests/TF_SMALL_NET_0013/test.info
new file mode 100644 (file)
index 0000000..137cdfa
--- /dev/null
@@ -0,0 +1,2 @@
+input,  Placeholder:0,  TF_FLOAT,   [6]
+output, Reshape:0,      TF_FLOAT,   [2, 3]
diff --git a/res/TensorFlowTests/TF_SMALL_NET_0013/test.pbtxt b/res/TensorFlowTests/TF_SMALL_NET_0013/test.pbtxt
new file mode 100644 (file)
index 0000000..a9c6aff
--- /dev/null
@@ -0,0 +1,72 @@
+# Network containing Shape node, which becomes Reshape's 'shape' input
+# Note that this is a work-around to test Shape
+#
+#                (tensor)
+#   Placeholder ---------- Reshape 
+#                        /
+#     Const --- Shape ---
+#                      (shape)
+node {
+  name: "Placeholder"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim { size: 6 }
+      }
+    }
+  }
+}
+node {
+  name: "Const"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim { size: 2 }
+          dim { size: 3 }
+        }
+        float_val: 1.0
+      }
+    }
+  }
+}
+node {
+  name: "Shape"
+  op: "Shape"
+  input: "Const"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "out_type"
+    value { type: DT_INT32 }
+  }
+}
+node {
+  name: "Reshape"
+  op: "Reshape"
+  input: "Placeholder"
+  input: "Shape"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "Tshape"
+    value { type: DT_INT32 }
+  }
+}