From: 윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 Date: Thu, 4 Jul 2019 04:49:14 +0000 (+0900) Subject: [mocotest-tf] test case for custom op (#4078) X-Git-Tag: nncc_backup~187 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=869b677135d31aafdd28280e84566fd436f8216d;p=platform%2Fcore%2Fml%2Fnnfw.git [mocotest-tf] test case for custom op (#4078) * [mocotest-tf] test case for custom op This is the first testcase for custom op. code for moco/loco extension will be written to pass this test. Signed-off-by: Hyun Sik Yoon * move into new resource dir --- diff --git a/res/TensorFlowTests/CustomOp_000/model.meta.pbtxt b/res/TensorFlowTests/CustomOp_000/model.meta.pbtxt new file mode 100644 index 0000000..a0d74ac --- /dev/null +++ b/res/TensorFlowTests/CustomOp_000/model.meta.pbtxt @@ -0,0 +1,16 @@ +# defining a list of custom ops for this compilation +custom_op { + name: "my/customOp/000" + op: "new_custom_op" + attr { + key: "output_shape" + value { + shape { + dim { size: 1 } + dim { size: 2 } + dim { size: 1 } + dim { size: 2 } + } + } + } +} diff --git a/res/TensorFlowTests/CustomOp_000/test.info b/res/TensorFlowTests/CustomOp_000/test.info new file mode 100644 index 0000000..e3e2b17 --- /dev/null +++ b/res/TensorFlowTests/CustomOp_000/test.info @@ -0,0 +1,2 @@ +input, Placeholder:0, TF_FLOAT, [1, 2, 1, 2] +output, output/relu:0, TF_FLOAT, [1, 2, 1, 2] diff --git a/res/TensorFlowTests/CustomOp_000/test.pbtxt b/res/TensorFlowTests/CustomOp_000/test.pbtxt new file mode 100644 index 0000000..373f5b8 --- /dev/null +++ b/res/TensorFlowTests/CustomOp_000/test.pbtxt @@ -0,0 +1,53 @@ +node { + name: "Placeholder" + op: "Placeholder" + attr { + key: "dtype" value { type: DT_FLOAT } } + attr { + key: "shape" + value { + shape { + dim { size: 1 } + dim { size: 2 } + dim { size: 1 } + dim { size: 2 } + } + } + } +} +node { + name: "my/customOp/000" + op: "new_custom_op" + input: "Placeholder" + attr { + key: "T" + value { type: DT_FLOAT } + } + attr { + key: "my_string" + value { s: "Hello World" } + } + attr { + key: "my_float" + value { f: 0.001 } + } + attr { + key: "my_int" + value { i: 111 } + } + attr { + key: "my_bool" + value { b: false } + } +} +node { + name: "output/relu" + op: "Relu" + input: "my/customOp/000" + attr { + key: "T" + value { + type: DT_FLOAT + } + } +}