Change operator ANEURALNETWORKS_TENSORFLOW_SUM_EX name to ANEURALNETWORKS_REDUCE_SUM_EX
Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
* Outputs:
* * 0: A tensor of the same {@link OperandCode} as input0.
*/
- ANEURALNETWORKS_TENSORFLOW_SUM_EX = 50009,
+ ANEURALNETWORKS_REDUCE_SUM_EX = 50009,
/**
* A transposed convolutional layer carries out a regular convolution but reverts its spatisal transformation.
* Transpose convolution basically performs convolution with transposed weights.
- *
+ *
* Supported tensor {@link OperandCode}:
* {@link ANEURALNETWORKS_TENSOR_FLOAT32}
* {@link ANEURALNETWORKS_TENSOR_INT32}
- *
+ *
* Supported tensor rank: only 4
- *
+ *
* Inputs:
* 0: An {@link ANEURALNETWORKS_INT32} 1-D four element tensor, specifying the output shape.
* 1: A 4-D tensor, of shape [depth_out, filter_height, filter_width, depth_in], specifying the filter.
* walking through input in the ‘width’ dimension.
* 5: An {@link ANEURALNETWORKS_INT32} scalar, specifying the stride when
* walking through input in the height dimension.
- *
+ *
* Outputs:
* 0: The output 4-D tensor, of shape [batches, out_height, out_width, depth_out].
*/
* number of splits along unpack axis.
* Outputs:
* * 0 ~ n-1: The list of n output tensors, of shape
- * [D0, D1, ..., Daxis(i), ..., Dm]. The output tensors are of the same
+ * [D0, D1, ..., Daxis(i), ..., Dm]. The output tensors are of the same
* {@link OperandCode} as the input tensor 0.
*/
ANEURALNETWORKS_UNPACK_EX = 50014,
continue;
case tflite::BuiltinOperator_SUM:
CHECK_NN(ANeuralNetworksModel_addOperationEx(
- nn_model, ANEURALNETWORKS_TENSORFLOW_SUM_EX,
+ nn_model, ANEURALNETWORKS_REDUCE_SUM_EX,
static_cast<uint32_t>(augmented_inputs.size()),
augmented_inputs.data(),
static_cast<uint32_t>(node.outputs->size),
}
else if (custom_name.compare("TensorFlowSum") == 0) {
CHECK_NN(ANeuralNetworksModel_addOperationEx(
- nn_model, ANEURALNETWORKS_TENSORFLOW_SUM_EX,
+ nn_model, ANEURALNETWORKS_REDUCE_SUM_EX,
static_cast<uint32_t>(augmented_inputs.size()),
augmented_inputs.data(),
static_cast<uint32_t>(node.outputs->size),
break;
}
- case ANEURALNETWORKS_TENSORFLOW_SUM_EX:
+ case ANEURALNETWORKS_REDUCE_SUM_EX:
{
using internal::tflite::op::ReduceSum::Param;
using internal::tflite::op::ReduceSum::Node;
reduce_min_ex::examples);
}
+namespace reduce_sum_ex_2D_float {
+std::vector<MixedTypedExample> examples = {
+// Generated reduce_sum_ex_2D_float test
+#include "generated/examples/reduce_sum_ex_2D_float.example.cpp"
+};
+// Generated model constructor
+#include "generated/models/reduce_sum_ex_2D_float.model.cpp"
+} // namespace reduce_sum_ex_2D_float
+TEST_F(GeneratedTests, reduce_sum_ex_2D_float) {
+ execute(reduce_sum_ex_2D_float::CreateModel,
+ reduce_sum_ex_2D_float::is_ignored,
+ reduce_sum_ex_2D_float::examples);
+}
+
+namespace reduce_sum_ex_4D_float {
+std::vector<MixedTypedExample> examples = {
+// Generated reduce_sum_ex_4D_float test
+#include "generated/examples/reduce_sum_ex_4D_float.example.cpp"
+};
+// Generated model constructor
+#include "generated/models/reduce_sum_ex_4D_float.model.cpp"
+} // namespace reduce_sum_ex_4D_float
+TEST_F(GeneratedTests, reduce_sum_ex_4D_float) {
+ execute(reduce_sum_ex_4D_float::CreateModel,
+ reduce_sum_ex_4D_float::is_ignored,
+ reduce_sum_ex_4D_float::examples);
+}
+
+namespace reduce_sum_ex_4D_float_reducing_C {
+std::vector<MixedTypedExample> examples = {
+// Generated reduce_sum_ex_4D_float_reducing_C test
+#include "generated/examples/reduce_sum_ex_4D_float_reducing_C.example.cpp"
+};
+// Generated model constructor
+#include "generated/models/reduce_sum_ex_4D_float_reducing_C.model.cpp"
+} // namespace reduce_sum_ex_4D_float_reducing_C
+TEST_F(GeneratedTests, reduce_sum_ex_4D_float_reducing_C) {
+ execute(reduce_sum_ex_4D_float_reducing_C::CreateModel,
+ reduce_sum_ex_4D_float_reducing_C::is_ignored,
+ reduce_sum_ex_4D_float_reducing_C::examples);
+}
+
+namespace reduce_sum_ex_4D_float_reducing_HW {
+std::vector<MixedTypedExample> examples = {
+// Generated reduce_sum_ex_4D_float_reducing_HW test
+#include "generated/examples/reduce_sum_ex_4D_float_reducing_HW.example.cpp"
+};
+// Generated model constructor
+#include "generated/models/reduce_sum_ex_4D_float_reducing_HW.model.cpp"
+} // namespace reduce_sum_ex_4D_float_reducing_HW
+TEST_F(GeneratedTests, reduce_sum_ex_4D_float_reducing_HW) {
+ execute(reduce_sum_ex_4D_float_reducing_HW::CreateModel,
+ reduce_sum_ex_4D_float_reducing_HW::is_ignored,
+ reduce_sum_ex_4D_float_reducing_HW::examples);
+}
+
namespace rsqrt_ex_float_1 {
std::vector<MixedTypedExample> examples = {
// Generated rsqrt_ex_float_1 test
tensorflowmax_ex_quant8_2::examples);
}
-namespace tensorflowsum_ex_2D_float {
-std::vector<MixedTypedExample> examples = {
-// Generated tensorflowsum_ex_2D_float test
-#include "generated/examples/tensorflowsum_ex_2D_float.example.cpp"
-};
-// Generated model constructor
-#include "generated/models/tensorflowsum_ex_2D_float.model.cpp"
-} // namespace tensorflowsum_ex_2D_float
-TEST_F(GeneratedTests, tensorflowsum_ex_2D_float) {
- execute(tensorflowsum_ex_2D_float::CreateModel,
- tensorflowsum_ex_2D_float::is_ignored,
- tensorflowsum_ex_2D_float::examples);
-}
-
-namespace tensorflowsum_ex_4D_float {
-std::vector<MixedTypedExample> examples = {
-// Generated tensorflowsum_ex_4D_float test
-#include "generated/examples/tensorflowsum_ex_4D_float.example.cpp"
-};
-// Generated model constructor
-#include "generated/models/tensorflowsum_ex_4D_float.model.cpp"
-} // namespace tensorflowsum_ex_4D_float
-TEST_F(GeneratedTests, tensorflowsum_ex_4D_float) {
- execute(tensorflowsum_ex_4D_float::CreateModel,
- tensorflowsum_ex_4D_float::is_ignored,
- tensorflowsum_ex_4D_float::examples);
-}
-
-namespace tensorflowsum_ex_4D_float_reducing_C {
-std::vector<MixedTypedExample> examples = {
-// Generated tensorflowsum_ex_4D_float_reducing_C test
-#include "generated/examples/tensorflowsum_ex_4D_float_reducing_C.example.cpp"
-};
-// Generated model constructor
-#include "generated/models/tensorflowsum_ex_4D_float_reducing_C.model.cpp"
-} // namespace tensorflowsum_ex_4D_float_reducing_C
-TEST_F(GeneratedTests, tensorflowsum_ex_4D_float_reducing_C) {
- execute(tensorflowsum_ex_4D_float_reducing_C::CreateModel,
- tensorflowsum_ex_4D_float_reducing_C::is_ignored,
- tensorflowsum_ex_4D_float_reducing_C::examples);
-}
-
-namespace tensorflowsum_ex_4D_float_reducing_HW {
-std::vector<MixedTypedExample> examples = {
-// Generated tensorflowsum_ex_4D_float_reducing_HW test
-#include "generated/examples/tensorflowsum_ex_4D_float_reducing_HW.example.cpp"
-};
-// Generated model constructor
-#include "generated/models/tensorflowsum_ex_4D_float_reducing_HW.model.cpp"
-} // namespace tensorflowsum_ex_4D_float_reducing_HW
-TEST_F(GeneratedTests, tensorflowsum_ex_4D_float_reducing_HW) {
- execute(tensorflowsum_ex_4D_float_reducing_HW::CreateModel,
- tensorflowsum_ex_4D_float_reducing_HW::is_ignored,
- tensorflowsum_ex_4D_float_reducing_HW::examples);
-}
-
namespace topk_v2_ex_1D_float {
std::vector<MixedTypedExample> examples = {
// Generated topk_v2_ex_1D_float test
-// Generated file (from: tensorflowsum_ex_2D_float.mod.py). Do not edit
+// Generated file (from: reduce_sum_ex_2D_float.mod.py). Do not edit
// Begin of an example
{
//Input(s)
-// Generated file (from: tensorflowsum_ex_4D_float.mod.py). Do not edit
+// Generated file (from: reduce_sum_ex_4D_float.mod.py). Do not edit
// Begin of an example
{
//Input(s)
-// Generated file (from: tensorflowsum_ex_4D_float_reducing_C.mod.py). Do not edit
+// Generated file (from: reduce_sum_ex_4D_float_reducing_C.mod.py). Do not edit
// Begin of an example
{
//Input(s)
-// Generated file (from: tensorflowsum_ex_4D_float_reducing_HW.mod.py). Do not edit
+// Generated file (from: reduce_sum_ex_4D_float_reducing_HW.mod.py). Do not edit
// Begin of an example
{
//Input(s)
-// Generated file (from: tensorflowsum_ex_2D_float.mod.py). Do not edit
+// Generated file (from: reduce_sum_ex_2D_float.mod.py). Do not edit
void CreateModel(Model *model) {
OperandType type1(Type::INT32, {});
OperandType type0(Type::TENSOR_FLOAT32, {3, 4});
// Phase 2, operations
static int32_t axis_init[] = {1};
model->setOperandValue(axis, axis_init, sizeof(int32_t) * 1);
- model->addOperationEx(ANEURALNETWORKS_TENSORFLOW_SUM_EX, {input, axis}, {output});
+ model->addOperationEx(ANEURALNETWORKS_REDUCE_SUM_EX, {input, axis}, {output});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{input},
-// Generated file (from: tensorflowsum_ex_4D_float.mod.py). Do not edit
+// Generated file (from: reduce_sum_ex_4D_float.mod.py). Do not edit
void CreateModel(Model *model) {
OperandType type1(Type::INT32, {});
OperandType type0(Type::TENSOR_FLOAT32, {1, 3, 4, 1});
// Phase 2, operations
static int32_t axis_init[] = {1};
model->setOperandValue(axis, axis_init, sizeof(int32_t) * 1);
- model->addOperationEx(ANEURALNETWORKS_TENSORFLOW_SUM_EX, {input, axis}, {output});
+ model->addOperationEx(ANEURALNETWORKS_REDUCE_SUM_EX, {input, axis}, {output});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{input},
-// Generated file (from: tensorflowsum_ex_4D_float_reducing_C.mod.py). Do not edit
+// Generated file (from: reduce_sum_ex_4D_float_reducing_C.mod.py). Do not edit
void CreateModel(Model *model) {
OperandType type0(Type::TENSOR_FLOAT32, {2, 3, 4, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 4});
// Phase 2, operations
static int32_t axis_init[] = {3, -1};
model->setOperandValue(axis, axis_init, sizeof(int32_t) * 2);
- model->addOperationEx(ANEURALNETWORKS_TENSORFLOW_SUM_EX, {input, axis}, {output});
+ model->addOperationEx(ANEURALNETWORKS_REDUCE_SUM_EX, {input, axis}, {output});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{input},
-// Generated file (from: tensorflowsum_ex_4D_float_reducing_HW.mod.py). Do not edit
+// Generated file (from: reduce_sum_ex_4D_float_reducing_HW.mod.py). Do not edit
void CreateModel(Model *model) {
OperandType type0(Type::TENSOR_FLOAT32, {2, 3, 4, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 5});
// Phase 2, operations
static int32_t axis_init[] = {1, 2, -3, -2};
model->setOperandValue(axis, axis_init, sizeof(int32_t) * 4);
- model->addOperationEx(ANEURALNETWORKS_TENSORFLOW_SUM_EX, {input, axis}, {output});
+ model->addOperationEx(ANEURALNETWORKS_REDUCE_SUM_EX, {input, axis}, {output});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{input},
GeneratedTests.gather_ex*
GeneratedTests.strided_slice_ex*
GeneratedTests.tensorflowmax_ex*
-GeneratedTests.tensorflowsum_ex*
+GeneratedTests.reduce_sum_ex*
GeneratedTests.topk_v2*
# Unhandled exception
GeneratedTests.concat*
GeneratedTests.tensorflowmax_ex_float_2
GeneratedTests.tensorflowmax_ex_quant8_1
GeneratedTests.tensorflowmax_ex_quant8_2
-GeneratedTests.tensorflowsum_ex_2D_float
-GeneratedTests.tensorflowsum_ex_4D_float
+GeneratedTests.reduce_sum_ex_2D_float
+GeneratedTests.reduce_sum_ex_4D_float
GeneratedTests.transpose
GeneratedTests.transpose_float_1
GeneratedTests.transpose_quant8_1
GeneratedTests.strided_slice_float_9
GeneratedTests.strided_slice
GeneratedTests.tensorflowmax_ex*
-GeneratedTests.tensorflowsum_ex*
+GeneratedTests.reduce_sum_ex*
GeneratedTests.sub_broadcast_float
TrivialTest.*
ValidationTest.*
i1 = Input("input", "TENSOR_FLOAT32", "{3, 4}")
axis = Int32Scalar("axis", 1)
out1 = Output("output", "TENSOR_FLOAT32", "{3}")
-model = model.Operation("TENSORFLOW_SUM_EX", i1, axis).To(out1)
+model = model.Operation("REDUCE_SUM_EX", i1, axis).To(out1)
# Example 1. Input in operand 0, 1
input0 = {i1: # input 0
i1 = Input("input", "TENSOR_FLOAT32", "{1, 3, 4, 1}")
axis = Int32Scalar("axis", 1)
out1 = Output("output", "TENSOR_FLOAT32", "{1, 4, 1}")
-model = model.Operation("TENSORFLOW_SUM_EX", i1, axis).To(out1)
+model = model.Operation("REDUCE_SUM_EX", i1, axis).To(out1)
# Example 1. Input in operand 0, 1
input0 = {i1: # input 0
axis = Parameter("axis", "TENSOR_INT32", "{2}", [3, -1])
output = Output("output", "TENSOR_FLOAT32", "{%d, %d, %d}" % (batch, rows, cols))
-model = model.Operation("TENSORFLOW_SUM_EX", i1, axis).To(output)
+model = model.Operation("REDUCE_SUM_EX", i1, axis).To(output)
# Example 1. Input in operand 0,
input0 = {i1: # input 0
axis = Parameter("axis", "TENSOR_INT32", "{4}", [1, 2, -3, -2])
output = Output("output", "TENSOR_FLOAT32", "{%d, %d}" % (batch, depth))
-model = model.Operation("TENSORFLOW_SUM_EX", i1, axis).To(output)
+model = model.Operation("REDUCE_SUM_EX", i1, axis).To(output)
# Example 1. Input in operand 0,
input0 = {i1: # input 0