Imported Upstream version 1.7.0
[platform/core/ml/nnfw.git] / res / TensorFlowLiteRecipes / GatherNd_001 / test.recipe
1 operand {
2   name: "param"
3   type: FLOAT32
4   shape { dim: 1 dim: 4 dim: 4 dim: 3 }
5 }
6 operand {
7   name: "indices"
8   type: INT32
9   shape { dim: 1 dim: 2 dim: 1 }
10   filler { tag: "explicit" arg: "0" arg: "0" }
11 }
12 operand {
13   name: "ofm"
14   type: FLOAT32
15   shape { dim: 1 dim: 2 dim: 4 dim: 4 dim: 3 }
16 }
17
18 # indices last dim is less than param rank, so gather_nd takes slices into `param`.
19 # thus indices [[[0], [0]]] take param[0] slice twice
20 # so output is [[[param[0]], [param[0]]]] with shape [1, 2, 4, 4, 3]
21
22 operation {
23   type: "GatherNd"
24   gather_nd_options {}
25   input: "param"
26   input: "indices"
27   output: "ofm"
28 }
29 input: "param"
30 input: "indices"
31 output: "ofm"