1 // clang-format off
2 // Generated file (from: reshape_quant8_weights_as_inputs.mod.py). Do not edit
CreateModel(Model * model)3 void CreateModel(Model *model) {
4   OperandType type0(Type::TENSOR_QUANT8_ASYMM, {1, 1, 3, 3}, 1.0f, 0);
5   OperandType type1(Type::TENSOR_INT32, {1});
6   OperandType type2(Type::TENSOR_QUANT8_ASYMM, {9}, 1.0f, 0);
7   // Phase 1, operands
8   auto op1 = model->addOperand(&type0);
9   auto op2 = model->addOperand(&type1);
10   auto op3 = model->addOperand(&type2);
11   // Phase 2, operations
12   model->addOperation(ANEURALNETWORKS_RESHAPE, {op1, op2}, {op3});
13   // Phase 3, inputs and outputs
14   model->identifyInputsAndOutputs(
15     {op1, op2},
16     {op3});
17   assert(model->isValid());
18 }
19 
is_ignored(int i)20 inline bool is_ignored(int i) {
21   static std::set<int> ignore = {};
22   return ignore.find(i) != ignore.end();
23 }
24 
CreateModel_dynamic_output_shape(Model * model)25 void CreateModel_dynamic_output_shape(Model *model) {
26   OperandType type0(Type::TENSOR_QUANT8_ASYMM, {1, 1, 3, 3}, 1.0f, 0);
27   OperandType type1(Type::TENSOR_INT32, {1});
28   OperandType type3(Type::TENSOR_QUANT8_ASYMM, {0}, 1.0f, 0);
29   // Phase 1, operands
30   auto op1 = model->addOperand(&type0);
31   auto op2 = model->addOperand(&type1);
32   auto op3 = model->addOperand(&type3);
33   // Phase 2, operations
34   model->addOperation(ANEURALNETWORKS_RESHAPE, {op1, op2}, {op3});
35   // Phase 3, inputs and outputs
36   model->identifyInputsAndOutputs(
37     {op1, op2},
38     {op3});
39   assert(model->isValid());
40 }
41 
is_ignored_dynamic_output_shape(int i)42 inline bool is_ignored_dynamic_output_shape(int i) {
43   static std::set<int> ignore = {};
44   return ignore.find(i) != ignore.end();
45 }
46 
47