1 // clang-format off
2 // Generated file (from: concat_quant8_3.mod.py). Do not edit
CreateModel(Model * model)3 void CreateModel(Model *model) {
4 OperandType type0(Type::TENSOR_QUANT8_ASYMM, {400, 60}, 0.5f, 0);
5 OperandType type1(Type::TENSOR_QUANT8_ASYMM, {400, 30}, 0.5f, 0);
6 OperandType type2(Type::INT32, {});
7 OperandType type3(Type::TENSOR_QUANT8_ASYMM, {400, 90}, 0.5f, 0);
8 // Phase 1, operands
9 auto input1 = model->addOperand(&type0);
10 auto input2 = model->addOperand(&type1);
11 auto axis1 = model->addOperand(&type2);
12 auto output = model->addOperand(&type3);
13 // Phase 2, operations
14 static int32_t axis1_init[] = {1};
15 model->setOperandValue(axis1, axis1_init, sizeof(int32_t) * 1);
16 model->addOperation(ANEURALNETWORKS_CONCATENATION, {input1, input2, axis1}, {output});
17 // Phase 3, inputs and outputs
18 model->identifyInputsAndOutputs(
19 {input1, input2},
20 {output});
21 assert(model->isValid());
22 }
23
is_ignored(int i)24 inline bool is_ignored(int i) {
25 static std::set<int> ignore = {};
26 return ignore.find(i) != ignore.end();
27 }
28
CreateModel_dynamic_output_shape(Model * model)29 void CreateModel_dynamic_output_shape(Model *model) {
30 OperandType type0(Type::TENSOR_QUANT8_ASYMM, {400, 60}, 0.5f, 0);
31 OperandType type1(Type::TENSOR_QUANT8_ASYMM, {400, 30}, 0.5f, 0);
32 OperandType type2(Type::INT32, {});
33 OperandType type4(Type::TENSOR_QUANT8_ASYMM, {0, 0}, 0.5f, 0);
34 // Phase 1, operands
35 auto input1 = model->addOperand(&type0);
36 auto input2 = model->addOperand(&type1);
37 auto axis1 = model->addOperand(&type2);
38 auto output = model->addOperand(&type4);
39 // Phase 2, operations
40 static int32_t axis1_init[] = {1};
41 model->setOperandValue(axis1, axis1_init, sizeof(int32_t) * 1);
42 model->addOperation(ANEURALNETWORKS_CONCATENATION, {input1, input2, axis1}, {output});
43 // Phase 3, inputs and outputs
44 model->identifyInputsAndOutputs(
45 {input1, input2},
46 {output});
47 assert(model->isValid());
48 }
49
is_ignored_dynamic_output_shape(int i)50 inline bool is_ignored_dynamic_output_shape(int i) {
51 static std::set<int> ignore = {};
52 return ignore.find(i) != ignore.end();
53 }
54
55