• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Generated file (from: logistic_float_2_relaxed.mod.py). Do not edit
CreateModel(Model * model)2 void CreateModel(Model *model) {
3   OperandType type0(Type::TENSOR_FLOAT32, {2, 32, 40, 2});
4   // Phase 1, operands
5   auto input = model->addOperand(&type0);
6   auto output = model->addOperand(&type0);
7   // Phase 2, operations
8   model->addOperation(ANEURALNETWORKS_LOGISTIC, {input}, {output});
9   // Phase 3, inputs and outputs
10   model->identifyInputsAndOutputs(
11     {input},
12     {output});
13   // Phase 4: set relaxed execution
14   model->relaxComputationFloat32toFloat16(true);
15   assert(model->isValid());
16 }
17 
is_ignored(int i)18 bool is_ignored(int i) {
19   static std::set<int> ignore = {};
20   return ignore.find(i) != ignore.end();
21 }
22