1 // Generated file (from: averpoolfloat.mod.py). Do not edit 2 void CreateModel(Model *model) { 3 OperandType type1(Type::INT32, {}); 4 OperandType type0(Type::TENSOR_QUANT8_ASYMM, 0.0f, 127.5f, {1, 2, 2, 1}); 5 // Phase 1, operands 6 auto op1 = model->addOperand(&type0); 7 auto cons1 = model->addOperand(&type1); 8 auto act = model->addOperand(&type1); 9 auto op3 = model->addOperand(&type0); 10 // Phase 2, operations 11 static int32_t cons1_init[] = {1}; 12 model->setOperandValue(cons1, cons1_init, sizeof(int32_t) * 1); 13 static int32_t act_init[] = {0}; 14 model->setOperandValue(act, act_init, sizeof(int32_t) * 1); 15 model->addOperation(ANEURALNETWORKS_AVERAGE_POOL, {op1, cons1, cons1, cons1, cons1, cons1, act}, {op3}); 16 // Phase 3, inputs and outputs 17 model->identifyInputsAndOutputs( 18 {op1}, 19 {op3}); 20 assert(model->isValid()); 21 } 22 23 bool is_ignored(int i) { 24 static std::set<int> ignore = {}; 25 return ignore.find(i) != ignore.end(); 26 } 27 // Generated file (from: averpoolfloat.mod.py). Do not edit 28 // Begin of an example 29 { 30 //Input(s) 31 { // See tools/test_generator/include/TestHarness.h:MixedTyped 32 // int -> FLOAT32 map 33 {}, 34 // int -> INT32 map 35 {}, 36 // int -> QUANT8_ASYMM map 37 {{0, {1, 2, 3, 4}}} 38 }, 39 //Output(s) 40 { // See tools/test_generator/include/TestHarness.h:MixedTyped 41 // int -> FLOAT32 map 42 {}, 43 // int -> INT32 map 44 {}, 45 // int -> QUANT8_ASYMM map 46 {{0, {1, 2, 3, 4}}} 47 } 48 }, // End of an example 49