1// Generated file (from: softmax_float_1_relaxed.mod.py). Do not edit 2void CreateModel(Model *model) { 3 OperandType type1(Type::FLOAT32, {}); 4 OperandType type0(Type::TENSOR_FLOAT32, {1, 4}); 5 // Phase 1, operands 6 auto input = model->addOperand(&type0); 7 auto beta = model->addOperand(&type1); 8 auto output = model->addOperand(&type0); 9 // Phase 2, operations 10 static float beta_init[] = {1e-06f}; 11 model->setOperandValue(beta, beta_init, sizeof(float) * 1); 12 model->addOperation(ANEURALNETWORKS_SOFTMAX, {input, beta}, {output}); 13 // Phase 3, inputs and outputs 14 model->identifyInputsAndOutputs( 15 {input}, 16 {output}); 17 // Phase 4: set relaxed execution 18 model->relaxComputationFloat32toFloat16(true); 19 assert(model->isValid()); 20} 21 22bool is_ignored(int i) { 23 static std::set<int> ignore = {}; 24 return ignore.find(i) != ignore.end(); 25} 26