| // Generated file (from: addfloat.mod.py). Do not edit |
| void CreateModel(Model *model) { |
| OperandType type0(Type::TENSOR_FLOAT32, {3,4}); |
| // Phase 1, operands |
| auto operand1 = model->addOperand(&type0); |
| auto operand2 = model->addOperand(&type0); |
| auto operand3 = model->addOperand(&type0); |
| auto operand4 = model->addOperand(&type0); |
| auto tmp4 = model->addOperand(&type0); |
| // Phase 2, operations |
| model->addOperation(ANEURALNETWORKS_ADD, {operand1, operand2}, {tmp4}); |
| model->addOperation(ANEURALNETWORKS_ADD, {operand3, tmp4}, {operand4}); |
| // Phase 3, inputs and outputs |
| model->setInputsAndOutputs( |
| {operand1, operand2, operand3}, |
| {operand4}); |
| assert(model->isValid()); |
| } |
| |
| bool is_ignored(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |