1 // Generated file (from: max_pool_quant8_4.mod.py). Do not edit
CreateModel(Model * model)2 void CreateModel(Model *model) {
3 OperandType type1(Type::INT32, {});
4 OperandType type2(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 1}, 0.0625f, 0);
5 OperandType type0(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 1}, 0.0625f, 0);
6 // Phase 1, operands
7 auto op1 = model->addOperand(&type0);
8 auto cons2 = model->addOperand(&type1);
9 auto pad_same = model->addOperand(&type1);
10 auto act_none = model->addOperand(&type1);
11 auto op3 = model->addOperand(&type2);
12 // Phase 2, operations
13 static int32_t cons2_init[] = {2};
14 model->setOperandValue(cons2, cons2_init, sizeof(int32_t) * 1);
15 static int32_t pad_same_init[] = {1};
16 model->setOperandValue(pad_same, pad_same_init, sizeof(int32_t) * 1);
17 static int32_t act_none_init[] = {0};
18 model->setOperandValue(act_none, act_none_init, sizeof(int32_t) * 1);
19 model->addOperation(ANEURALNETWORKS_MAX_POOL_2D, {op1, pad_same, cons2, cons2, cons2, cons2, act_none}, {op3});
20 // Phase 3, inputs and outputs
21 model->identifyInputsAndOutputs(
22 {op1},
23 {op3});
24 assert(model->isValid());
25 }
26
is_ignored(int i)27 bool is_ignored(int i) {
28 static std::set<int> ignore = {};
29 return ignore.find(i) != ignore.end();
30 }
31