• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // clang-format off
2 // Generated file (from: relu_quant8_1.mod.py). Do not edit
CreateModel(Model * model)3 void CreateModel(Model *model) {
4   OperandType type0(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 1.0f, 128);
5   // Phase 1, operands
6   auto op1 = model->addOperand(&type0);
7   auto op2 = model->addOperand(&type0);
8   // Phase 2, operations
9   model->addOperation(ANEURALNETWORKS_RELU, {op1}, {op2});
10   // Phase 3, inputs and outputs
11   model->identifyInputsAndOutputs(
12     {op1},
13     {op2});
14   assert(model->isValid());
15 }
16 
is_ignored(int i)17 inline bool is_ignored(int i) {
18   static std::set<int> ignore = {};
19   return ignore.find(i) != ignore.end();
20 }
21 
CreateModel_dynamic_output_shape(Model * model)22 void CreateModel_dynamic_output_shape(Model *model) {
23   OperandType type0(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 1.0f, 128);
24   OperandType type1(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 1.0f, 128);
25   // Phase 1, operands
26   auto op1 = model->addOperand(&type0);
27   auto op2 = model->addOperand(&type1);
28   // Phase 2, operations
29   model->addOperation(ANEURALNETWORKS_RELU, {op1}, {op2});
30   // Phase 3, inputs and outputs
31   model->identifyInputsAndOutputs(
32     {op1},
33     {op2});
34   assert(model->isValid());
35 }
36 
is_ignored_dynamic_output_shape(int i)37 inline bool is_ignored_dynamic_output_shape(int i) {
38   static std::set<int> ignore = {};
39   return ignore.find(i) != ignore.end();
40 }
41 
CreateModel_2(Model * model)42 void CreateModel_2(Model *model) {
43   OperandType type0(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 1.0f, 128);
44   // Phase 1, operands
45   auto op1 = model->addOperand(&type0);
46   auto op2 = model->addOperand(&type0);
47   // Phase 2, operations
48   model->addOperation(ANEURALNETWORKS_RELU, {op1}, {op2});
49   // Phase 3, inputs and outputs
50   model->identifyInputsAndOutputs(
51     {op1},
52     {op2});
53   assert(model->isValid());
54 }
55 
is_ignored_2(int i)56 inline bool is_ignored_2(int i) {
57   static std::set<int> ignore = {};
58   return ignore.find(i) != ignore.end();
59 }
60 
CreateModel_dynamic_output_shape_2(Model * model)61 void CreateModel_dynamic_output_shape_2(Model *model) {
62   OperandType type0(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 1.0f, 128);
63   OperandType type1(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 1.0f, 128);
64   // Phase 1, operands
65   auto op1 = model->addOperand(&type0);
66   auto op2 = model->addOperand(&type1);
67   // Phase 2, operations
68   model->addOperation(ANEURALNETWORKS_RELU, {op1}, {op2});
69   // Phase 3, inputs and outputs
70   model->identifyInputsAndOutputs(
71     {op1},
72     {op2});
73   assert(model->isValid());
74 }
75 
is_ignored_dynamic_output_shape_2(int i)76 inline bool is_ignored_dynamic_output_shape_2(int i) {
77   static std::set<int> ignore = {};
78   return ignore.find(i) != ignore.end();
79 }
80 
81