• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // clang-format off
2 // Generated file (from: relu6_quant8_2.mod.py). Do not edit
CreateModel(Model * model)3 void CreateModel(Model *model) {
4   OperandType type0(Type::TENSOR_QUANT8_ASYMM, {2, 128, 20, 2}, 1.0f, 128);
5   // Phase 1, operands
6   auto input = model->addOperand(&type0);
7   auto output = model->addOperand(&type0);
8   // Phase 2, operations
9   model->addOperation(ANEURALNETWORKS_RELU6, {input}, {output});
10   // Phase 3, inputs and outputs
11   model->identifyInputsAndOutputs(
12     {input},
13     {output});
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, {2, 128, 20, 2}, 1.0f, 128);
24   OperandType type1(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 1.0f, 128);
25   // Phase 1, operands
26   auto input = model->addOperand(&type0);
27   auto output = model->addOperand(&type1);
28   // Phase 2, operations
29   model->addOperation(ANEURALNETWORKS_RELU6, {input}, {output});
30   // Phase 3, inputs and outputs
31   model->identifyInputsAndOutputs(
32     {input},
33     {output});
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 
42