[res] Introduce UNIT_Mean_00X testcases (#7051)
author남궁석/On-Device Lab(SR)/Engineer/삼성전자 <sk.namkoong@samsung.com>
Tue, 3 Sep 2019 01:08:24 +0000 (10:08 +0900)
committer박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Tue, 3 Sep 2019 01:08:24 +0000 (10:08 +0900)
This commit will introduce `UNIT_Mean_000` ~ `UNIT_MEAN_004`
testcases

Signed-off-by: Seok NamKoong <sk.namkoong@samsung.com>
res/TensorFlowTests/UNIT_Mean_000/test.info [new file with mode: 0644]
res/TensorFlowTests/UNIT_Mean_000/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/UNIT_Mean_001/test.info [new file with mode: 0644]
res/TensorFlowTests/UNIT_Mean_001/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/UNIT_Mean_002/test.info [new file with mode: 0644]
res/TensorFlowTests/UNIT_Mean_002/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/UNIT_Mean_003/test.info [new file with mode: 0644]
res/TensorFlowTests/UNIT_Mean_003/test.pbtxt [new file with mode: 0644]

diff --git a/res/TensorFlowTests/UNIT_Mean_000/test.info b/res/TensorFlowTests/UNIT_Mean_000/test.info
new file mode 100644 (file)
index 0000000..fed1cbd
--- /dev/null
@@ -0,0 +1,2 @@
+input,  Placeholder:0,  TF_FLOAT,   [1, 3, 3, 2]
+output, Mean:0,         TF_FLOAT,   [1, 1, 1, 2]
diff --git a/res/TensorFlowTests/UNIT_Mean_000/test.pbtxt b/res/TensorFlowTests/UNIT_Mean_000/test.pbtxt
new file mode 100644 (file)
index 0000000..8a9f784
--- /dev/null
@@ -0,0 +1,68 @@
+# Reference Python code:
+#
+# import tensorflow as tf
+#
+# inp = tf.placeholder(tf.float32, [1,3,3,2])
+# mean = tf.math.reduce_mean(inp, keepdims=True, axis=[1,2])
+#
+# print(tf.get_default_graph().as_graph_def())
+#
+# WARNING! Below GraphDef is modified to make it easy to read
+node {
+  name: "Placeholder"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim { size: 1 }
+        dim { size: 3 }
+        dim { size: 3 }
+        dim { size: 2 }
+      }
+    }
+  }
+}
+node {
+  name: "Mean/reduction_indices"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value { type: DT_INT32 }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_INT32
+        tensor_shape {
+          dim { size: 2 }
+        }
+        int_val: 1
+        int_val: 2
+      }
+    }
+  }
+}
+node {
+  name: "Mean"
+  op: "Mean"
+  input: "Placeholder"
+  input: "Mean/reduction_indices"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "Tidx"
+    value { type: DT_INT32 }
+  }
+  attr {
+    key: "keep_dims"
+    value { b: true }
+  }
+}
diff --git a/res/TensorFlowTests/UNIT_Mean_001/test.info b/res/TensorFlowTests/UNIT_Mean_001/test.info
new file mode 100644 (file)
index 0000000..682e7cb
--- /dev/null
@@ -0,0 +1,2 @@
+input,  Placeholder:0,  TF_FLOAT,   [1, 3, 3, 2]
+output, Mean:0,         TF_FLOAT,   [1, 2]
diff --git a/res/TensorFlowTests/UNIT_Mean_001/test.pbtxt b/res/TensorFlowTests/UNIT_Mean_001/test.pbtxt
new file mode 100644 (file)
index 0000000..a579b2c
--- /dev/null
@@ -0,0 +1,68 @@
+# Reference Python code:
+#
+# import tensorflow as tf
+#
+# inp = tf.placeholder(tf.float32, [1,3,3,2])
+# mean = tf.math.reduce_mean(inp, keepdims=False, axis=[1,2])
+#
+# print(tf.get_default_graph().as_graph_def())
+#
+# WARNING! Below GraphDef is modified to make it easy to read
+node {
+  name: "Placeholder"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim { size: 1 }
+        dim { size: 3 }
+        dim { size: 3 }
+        dim { size: 2 }
+      }
+    }
+  }
+}
+node {
+  name: "Mean/reduction_indices"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value { type: DT_INT32 }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_INT32
+        tensor_shape {
+          dim { size: 2 }
+        }
+        int_val: 1
+        int_val: 2
+      }
+    }
+  }
+}
+node {
+  name: "Mean"
+  op: "Mean"
+  input: "Placeholder"
+  input: "Mean/reduction_indices"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "Tidx"
+    value { type: DT_INT32 }
+  }
+  attr {
+    key: "keep_dims"
+    value { b: false }
+  }
+}
diff --git a/res/TensorFlowTests/UNIT_Mean_002/test.info b/res/TensorFlowTests/UNIT_Mean_002/test.info
new file mode 100644 (file)
index 0000000..682e7cb
--- /dev/null
@@ -0,0 +1,2 @@
+input,  Placeholder:0,  TF_FLOAT,   [1, 3, 3, 2]
+output, Mean:0,         TF_FLOAT,   [1, 2]
diff --git a/res/TensorFlowTests/UNIT_Mean_002/test.pbtxt b/res/TensorFlowTests/UNIT_Mean_002/test.pbtxt
new file mode 100644 (file)
index 0000000..1d129f9
--- /dev/null
@@ -0,0 +1,68 @@
+# Reference Python code:
+#
+# import tensorflow as tf
+#
+# inp = tf.placeholder(tf.float32, [1,3,3,2])
+# mean = tf.math.reduce_mean(inp, keepdims=False, axis=[-2,-3])
+#
+# print(tf.get_default_graph().as_graph_def())
+#
+# WARNING! Below GraphDef is modified to make it easy to read
+node {
+  name: "Placeholder"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim { size: 1 }
+        dim { size: 3 }
+        dim { size: 3 }
+        dim { size: 2 }
+      }
+    }
+  }
+}
+node {
+  name: "Mean/reduction_indices"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value { type: DT_INT32 }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_INT32
+        tensor_shape {
+          dim { size: 2 }
+        }
+        int_val: -2
+        int_val: -3
+      }
+    }
+  }
+}
+node {
+  name: "Mean"
+  op: "Mean"
+  input: "Placeholder"
+  input: "Mean/reduction_indices"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "Tidx"
+    value { type: DT_INT32 }
+  }
+  attr {
+    key: "keep_dims"
+    value { b: false }
+  }
+}
diff --git a/res/TensorFlowTests/UNIT_Mean_003/test.info b/res/TensorFlowTests/UNIT_Mean_003/test.info
new file mode 100644 (file)
index 0000000..fed1cbd
--- /dev/null
@@ -0,0 +1,2 @@
+input,  Placeholder:0,  TF_FLOAT,   [1, 3, 3, 2]
+output, Mean:0,         TF_FLOAT,   [1, 1, 1, 2]
diff --git a/res/TensorFlowTests/UNIT_Mean_003/test.pbtxt b/res/TensorFlowTests/UNIT_Mean_003/test.pbtxt
new file mode 100644 (file)
index 0000000..383a1f2
--- /dev/null
@@ -0,0 +1,68 @@
+# Reference Python code:
+#
+# import tensorflow as tf
+#
+# inp = tf.placeholder(tf.float32, [1,3,3,2])
+# mean = tf.math.reduce_mean(inp, keepdims=True, axis=[-2,-3])
+#
+# print(tf.get_default_graph().as_graph_def())
+#
+# WARNING! Below GraphDef is modified to make it easy to read
+node {
+  name: "Placeholder"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim { size: 1 }
+        dim { size: 3 }
+        dim { size: 3 }
+        dim { size: 2 }
+      }
+    }
+  }
+}
+node {
+  name: "Mean/reduction_indices"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value { type: DT_INT32 }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_INT32
+        tensor_shape {
+          dim { size: 2 }
+        }
+        int_val: -2
+        int_val: -3
+      }
+    }
+  }
+}
+node {
+  name: "Mean"
+  op: "Mean"
+  input: "Placeholder"
+  input: "Mean/reduction_indices"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "Tidx"
+    value { type: DT_INT32 }
+  }
+  attr {
+    key: "keep_dims"
+    value { b: true }
+  }
+}