From ff08f064a661daf70f03b49d77859a57c75e92be Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=82=A8=EA=B6=81=EC=84=9D/On-Device=20Lab=28SR=29/Enginee?= =?utf8?q?r/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Tue, 3 Sep 2019 10:08:24 +0900 Subject: [PATCH] [res] Introduce UNIT_Mean_00X testcases (#7051) This commit will introduce `UNIT_Mean_000` ~ `UNIT_MEAN_004` testcases Signed-off-by: Seok NamKoong --- res/TensorFlowTests/UNIT_Mean_000/test.info | 2 + res/TensorFlowTests/UNIT_Mean_000/test.pbtxt | 68 ++++++++++++++++++++++++++++ res/TensorFlowTests/UNIT_Mean_001/test.info | 2 + res/TensorFlowTests/UNIT_Mean_001/test.pbtxt | 68 ++++++++++++++++++++++++++++ res/TensorFlowTests/UNIT_Mean_002/test.info | 2 + res/TensorFlowTests/UNIT_Mean_002/test.pbtxt | 68 ++++++++++++++++++++++++++++ res/TensorFlowTests/UNIT_Mean_003/test.info | 2 + res/TensorFlowTests/UNIT_Mean_003/test.pbtxt | 68 ++++++++++++++++++++++++++++ 8 files changed, 280 insertions(+) create mode 100644 res/TensorFlowTests/UNIT_Mean_000/test.info create mode 100644 res/TensorFlowTests/UNIT_Mean_000/test.pbtxt create mode 100644 res/TensorFlowTests/UNIT_Mean_001/test.info create mode 100644 res/TensorFlowTests/UNIT_Mean_001/test.pbtxt create mode 100644 res/TensorFlowTests/UNIT_Mean_002/test.info create mode 100644 res/TensorFlowTests/UNIT_Mean_002/test.pbtxt create mode 100644 res/TensorFlowTests/UNIT_Mean_003/test.info create mode 100644 res/TensorFlowTests/UNIT_Mean_003/test.pbtxt diff --git a/res/TensorFlowTests/UNIT_Mean_000/test.info b/res/TensorFlowTests/UNIT_Mean_000/test.info new file mode 100644 index 0000000..fed1cbd --- /dev/null +++ b/res/TensorFlowTests/UNIT_Mean_000/test.info @@ -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 index 0000000..8a9f784 --- /dev/null +++ b/res/TensorFlowTests/UNIT_Mean_000/test.pbtxt @@ -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 index 0000000..682e7cb --- /dev/null +++ b/res/TensorFlowTests/UNIT_Mean_001/test.info @@ -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 index 0000000..a579b2c --- /dev/null +++ b/res/TensorFlowTests/UNIT_Mean_001/test.pbtxt @@ -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 index 0000000..682e7cb --- /dev/null +++ b/res/TensorFlowTests/UNIT_Mean_002/test.info @@ -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 index 0000000..1d129f9 --- /dev/null +++ b/res/TensorFlowTests/UNIT_Mean_002/test.pbtxt @@ -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 index 0000000..fed1cbd --- /dev/null +++ b/res/TensorFlowTests/UNIT_Mean_003/test.info @@ -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 index 0000000..383a1f2 --- /dev/null +++ b/res/TensorFlowTests/UNIT_Mean_003/test.pbtxt @@ -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 } + } +} -- 2.7.4