This commit modifies output's order of Topk_v2 operation in runtime_run_android_nn_test.
-First one is values of output and second one is indexes of output.
Signed-off-by: SungJin Choi <lotieye.choi@samsung.com>
//Output(s)
{ // See tools/test_generator/include/TestHarness.h:MixedTyped
// int -> FLOAT32 map
- {{1, {6.123456789123456f, 5.123456789123456f}}},
+ {{0, {6.123456789123456f, 5.123456789123456f}}},
// int -> INT32 map
- {{0, {3, 2}}},
+ {{1, {3, 2}}},
// int -> QUANT8_ASYMM map
{}
}
// int -> FLOAT32 map
{},
// int -> INT32 map
- {{0, {3, 2}}, {1, {60000, 50000}}},
+ {{0, {60000, 50000}}, {1, {3, 2}}},
// int -> QUANT8_ASYMM map
{}
}
// int -> FLOAT32 map
{},
// int -> INT32 map
- {{0, {3, 2}}},
+ {{1, {3, 2}}},
// int -> QUANT8_ASYMM map
- {{1, {6, 5}}}
+ {{0, {6, 5}}}
}
}, // End of an example
//Output(s)
{ // See tools/test_generator/include/TestHarness.h:MixedTyped
// int -> FLOAT32 map
- {{1, {6.123456789123456f, 5.123456789123456f, 9.123456789123457f, 8.123456789123457f, 19.123456789123455f, 18.123456789123455f}}},
+ {{0, {6.123456789123456f, 5.123456789123456f, 9.123456789123457f, 8.123456789123457f, 19.123456789123455f, 18.123456789123455f}}},
// int -> INT32 map
- {{0, {3, 2, 2, 1, 2, 1}}},
+ {{1, {3, 2, 2, 1, 2, 1}}},
// int -> QUANT8_ASYMM map
{}
}
// int -> FLOAT32 map
{},
// int -> INT32 map
- {{0, {3, 2, 2, 1, 2, 1}}, {1, {60000, 50000, 90000, 80000, 190000, 180000}}},
+ {{0, {60000, 50000, 90000, 80000, 190000, 180000}}, {1, {3, 2, 2, 1, 2, 1}}},
// int -> QUANT8_ASYMM map
{}
}
// int -> FLOAT32 map
{},
// int -> INT32 map
- {{0, {3, 2, 2, 1, 2, 1}}},
+ {{1, {3, 2, 2, 1, 2, 1}}},
// int -> QUANT8_ASYMM map
- {{1, {6, 5, 9, 8, 19, 18}}}
+ {{0, {6, 5, 9, 8, 19, 18}}}
}
}, // End of an example
// Generated file (from: topk_v2_1D_float.mod.py). Do not edit
void CreateModel(Model *model) {
OperandType type1(Type::INT32, {});
- OperandType type3(Type::TENSOR_FLOAT32, {2});
+ OperandType type2(Type::TENSOR_FLOAT32, {2});
OperandType type0(Type::TENSOR_FLOAT32, {4});
- OperandType type2(Type::TENSOR_INT32, {2});
+ OperandType type3(Type::TENSOR_INT32, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type0);
auto k = model->addOperand(&type1);
// Generated file (from: topk_v2_1D_uint8.mod.py). Do not edit
void CreateModel(Model *model) {
OperandType type1(Type::INT32, {});
- OperandType type2(Type::TENSOR_INT32, {2});
- OperandType type3(Type::TENSOR_QUANT8_ASYMM, {2});
+ OperandType type3(Type::TENSOR_INT32, {2});
+ OperandType type2(Type::TENSOR_QUANT8_ASYMM, {2});
OperandType type0(Type::TENSOR_QUANT8_ASYMM, {4});
// Phase 1, operands
auto op1 = model->addOperand(&type0);
// Generated file (from: topk_v2_2D_float.mod.py). Do not edit
void CreateModel(Model *model) {
OperandType type1(Type::INT32, {});
- OperandType type3(Type::TENSOR_FLOAT32, {3,2});
+ OperandType type2(Type::TENSOR_FLOAT32, {3,2});
OperandType type0(Type::TENSOR_FLOAT32, {3,4});
- OperandType type2(Type::TENSOR_INT32, {3,2});
+ OperandType type3(Type::TENSOR_INT32, {3,2});
// Phase 1, operands
auto op1 = model->addOperand(&type0);
auto k = model->addOperand(&type1);
// Generated file (from: topk_v2_2D_uint8.mod.py). Do not edit
void CreateModel(Model *model) {
OperandType type1(Type::INT32, {});
- OperandType type2(Type::TENSOR_INT32, {3,2});
- OperandType type3(Type::TENSOR_QUANT8_ASYMM, {3,2});
+ OperandType type3(Type::TENSOR_INT32, {3,2});
+ OperandType type2(Type::TENSOR_QUANT8_ASYMM, {3,2});
OperandType type0(Type::TENSOR_QUANT8_ASYMM, {3,4});
// Phase 1, operands
auto op1 = model->addOperand(&type0);
model = Model()
i1 = Input("op1", "TENSOR_FLOAT32", "{4}") # a vector of input
k = Int32Scalar("k", 2)
-i2 = Output("op2", "TENSOR_INT32", "{2}") # indexes of output
-i3 = Output("op3", "TENSOR_FLOAT32", "{2}") # values of output
+i2 = Output("op2", "TENSOR_FLOAT32", "{2}") # values of output
+i3 = Output("op3", "TENSOR_INT32", "{2}") # indexes of output
model = model.Operation("TOPK_V2_EX", i1, k).To([i2, i3])
# Example 1. Input in operand 0,
[3.123456789123456789, 4.123456789123456789, 5.123456789123456789, 6.123456789123456789]}
output0 = {i2: # output 0
- [3, 2],
+ [6.123456789123456789, 5.123456789123456789],
i3: # output 1
- [6.123456789123456789, 5.123456789123456789]}
+ [3, 2]}
# Instantiate an example
Example((input0, output0))
model = Model()
i1 = Input("op1", "TENSOR_INT32", "{4}") # a vector of input
k = Int32Scalar("k", 2)
-i2 = Output("op2", "TENSOR_INT32", "{2}") # indexes of output
-i3 = Output("op3", "TENSOR_INT32", "{2}") # values of output
+i2 = Output("op2", "TENSOR_INT32", "{2}") # values of output
+i3 = Output("op3", "TENSOR_INT32", "{2}") # indexes of output
model = model.Operation("TOPK_V2_EX", i1, k).To([i2, i3])
# Example 1. Input in operand 0,
[40000, 41000, 50000, 60000]}
output0 = {i2: # output 0
- [3, 2],
+ [60000, 50000],
i3: # output 1
- [60000, 50000]}
+ [3, 2]}
# Instantiate an example
Example((input0, output0))
model = Model()
i1 = Input("op1", "TENSOR_QUANT8_ASYMM", "{4}") # a vector of input
k = Int32Scalar("k", 2)
-i2 = Output("op2", "TENSOR_INT32", "{2}") # indexes of output
-i3 = Output("op3", "TENSOR_QUANT8_ASYMM", "{2}") # values of output
+i2 = Output("op2", "TENSOR_QUANT8_ASYMM", "{2}") # values of output
+i3 = Output("op3", "TENSOR_INT32", "{2}") # indexes of output
model = model.Operation("TOPK_V2_EX", i1, k).To([i2, i3])
# Example 1. Input in operand 0,
[3, 4, 5, 6]}
output0 = {i2: # output 0
- [3, 2],
+ [6, 5],
i3: # output 1
- [6, 5]}
+ [3, 2]}
# Instantiate an example
Example((input0, output0))
model = Model()
i1 = Input("op1", "TENSOR_FLOAT32", "{3,4}") # a matirx of input
k = Int32Scalar("k", 2)
-o1 = Output("op2", "TENSOR_INT32", "{3,2}") # indexes of output
-o2 = Output("op3", "TENSOR_FLOAT32", "{3,2}") # values of output
+o1 = Output("op2", "TENSOR_FLOAT32", "{3,2}") # values of output
+o2 = Output("op3", "TENSOR_INT32", "{3,2}") # indexes of output
model = model.Operation("TOPK_V2_EX", i1, k).To([o1, o2])
# Example 1. Input in operand 0,
7.123456789123456789, 8.123456789123456789, 9.123456789123456789, 1.123456789123456789,
2.123456789123456789, 18.123456789123456789, 19.123456789123456789, 11.123456789123456789]}
-output0 = {o1: # output 0
- [3, 2,
- 2, 1,
- 2, 1],
- o2: # output 1
+output0 = {o1: # output 1
[6.123456789123456789, 5.123456789123456789,
9.123456789123456789, 8.123456789123456789,
- 19.123456789123456789, 18.123456789123456789]}
+ 19.123456789123456789, 18.123456789123456789],
+ o2: # output 1
+ [3, 2,
+ 2, 1,
+ 2, 1]}
# Instantiate an example
Example((input0, output0))
170000, 180000, 190000, 110000]}
output0 = {i2: # output 0
- [3, 2,
- 2, 1,
- 2, 1],
- i3: # output 1
[60000, 50000,
90000, 80000,
- 190000, 180000]}
+ 190000, 180000],
+ i3: # output 1
+ [3, 2,
+ 2, 1,
+ 2, 1]}
# Instantiate an example
Example((input0, output0))
model = Model()
i1 = Input("op1", "TENSOR_QUANT8_ASYMM", "{3,4}") # a vector of input
k = Int32Scalar("k", 2)
-i2 = Output("op2", "TENSOR_INT32", "{3,2}") # indexes of output
-i3 = Output("op3", "TENSOR_QUANT8_ASYMM", "{3,2}") # values of output
+i2 = Output("op2", "TENSOR_QUANT8_ASYMM", "{3,2}") # values of output
+i3 = Output("op3", "TENSOR_INT32", "{3,2}") # indexes of output
model = model.Operation("TOPK_V2_EX", i1, k).To([i2, i3])
# Example 1. Input in operand 0,
2, 18, 19, 11]}
output0 = {i2: # output 0
- [3, 2,
- 2, 1,
- 2, 1],
- i3: # output 1
[6, 5,
9, 8,
- 19, 18]}
+ 19, 18],
+ i3: # output 1
+ [3, 2,
+ 2, 1,
+ 2, 1]}
# Instantiate an example
Example((input0, output0))