diff options
author | 윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 <hyunsik.yoon@samsung.com> | 2019-07-23 09:27:36 +0900 |
---|---|---|
committer | 박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com> | 2019-07-23 09:27:36 +0900 |
commit | 31cb6181205b9962664f32f8467bc77ea132d70f (patch) | |
tree | 95a4713c7511e5cc1a5f60599404adf025c98071 /res/TensorFlowTests/TF_SMALL_NET_0011 | |
parent | d3560bb942a50a1fe27cd8f8d0c410ab66f4f4e9 (diff) | |
download | nnfw-31cb6181205b9962664f32f8467bc77ea132d70f.tar.gz nnfw-31cb6181205b9962664f32f8467bc77ea132d70f.tar.bz2 nnfw-31cb6181205b9962664f32f8467bc77ea132d70f.zip |
[res/TensorFlowTests] test case network for constant folding (#5739)
This commit adds a network test case for constant folding.
Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
Diffstat (limited to 'res/TensorFlowTests/TF_SMALL_NET_0011')
-rw-r--r-- | res/TensorFlowTests/TF_SMALL_NET_0011/test.info | 2 | ||||
-rw-r--r-- | res/TensorFlowTests/TF_SMALL_NET_0011/test.pbtxt | 129 |
2 files changed, 131 insertions, 0 deletions
diff --git a/res/TensorFlowTests/TF_SMALL_NET_0011/test.info b/res/TensorFlowTests/TF_SMALL_NET_0011/test.info new file mode 100644 index 000000000..7fb5ec2c0 --- /dev/null +++ b/res/TensorFlowTests/TF_SMALL_NET_0011/test.info @@ -0,0 +1,2 @@ +input, placeholder:0, TF_FLOAT, [2] +output, concat_out:0, TF_FLOAT, [6] diff --git a/res/TensorFlowTests/TF_SMALL_NET_0011/test.pbtxt b/res/TensorFlowTests/TF_SMALL_NET_0011/test.pbtxt new file mode 100644 index 000000000..a44aba783 --- /dev/null +++ b/res/TensorFlowTests/TF_SMALL_NET_0011/test.pbtxt @@ -0,0 +1,129 @@ +# A simple network that includes constant foldable subgraph +# (note: [] indicates shape, () indicates real value) +# +# input1 (const) -- relu -+ placeholder --+ +# (-1, 1) (0, 1) | shape [2] | +# | | +# input2 (const) -+-- concat -------- concat_out +# (2, 3) | (0, 1, 2, 3) | +# | | +# axis (const)-+-------------------+ +# +# will be the following after constant folding: +# +# Pull --+ +# shape [2] | +# | +# ConstGen------- TensorConcat -- Push +# (0, 1, 2, 3) shape [6] +# +node { + name: "input1" + op: "Const" + attr { + key: "dtype" value { type: DT_FLOAT } + } + attr { + key: "value" + value { + tensor { + dtype: DT_FLOAT + tensor_shape { dim { size: 2 } } + float_val: -1 + float_val: 1 + } + } + } +} +node { + name: "relu" + op: "Relu" + input: "input1" + attr { key: "T" value { type: DT_FLOAT } } +} +node { + name: "input2" + op: "Const" + attr { + key: "dtype" value { type: DT_FLOAT } + } + attr { + key: "value" + value { + tensor { + dtype: DT_FLOAT + tensor_shape { dim { size: 2 } } + float_val: 2 + float_val: 3 + } + } + } +} +node { + name: "axis" + op: "Const" + attr { key: "dtype" value { type: DT_INT32 } } + attr { + key: "value" + value { + tensor { + dtype: DT_INT32 + tensor_shape { } + int_val: 0 + } + } + } +} +node { + name: "concat" + op: "ConcatV2" + input: "relu" + input: "input2" + input: "axis" + attr { + key: "N" + value { i: 2 } + } + attr { + key: "T" + value { type: DT_FLOAT } + } + attr { + key: "Tidx" + value { type: DT_INT32 } + } +} +node { + name: "placeholder" + op: "Placeholder" + attr { + key: "dtype" value { type: DT_FLOAT } + } + attr { + key: "shape" + value { + shape { + dim { size: 2 } + } + } + } +} +node { + name: "concat_out" + op: "ConcatV2" + input: "concat" + input: "placeholder" + input: "axis" + attr { + key: "N" + value { i: 2 } + } + attr { + key: "T" + value { type: DT_FLOAT } + } + attr { + key: "Tidx" + value { type: DT_INT32 } + } +} |