From: 남궁석/On-Device Lab(SR)/Engineer/삼성전자 Date: Tue, 3 Sep 2019 01:08:24 +0000 (+0900) Subject: [res] Introduce UNIT_Mean_00X testcases (#7051) X-Git-Tag: accepted/tizen/unified/20190904.110638~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff08f064a661daf70f03b49d77859a57c75e92be;p=platform%2Fcore%2Fml%2Fnnfw.git [res] Introduce UNIT_Mean_00X testcases (#7051) This commit will introduce `UNIT_Mean_000` ~ `UNIT_MEAN_004` testcases Signed-off-by: Seok NamKoong --- 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 } + } +}