• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Generated file (from: concat_float_2_relaxed.mod.py). Do not edit
CreateModel(Model * model)2 void CreateModel(Model *model) {
3   OperandType type2(Type::INT32, {});
4   OperandType type1(Type::TENSOR_FLOAT32, {40, 230});
5   OperandType type0(Type::TENSOR_FLOAT32, {52, 230});
6   OperandType type3(Type::TENSOR_FLOAT32, {92, 230});
7   // Phase 1, operands
8   auto input1 = model->addOperand(&type0);
9   auto input2 = model->addOperand(&type1);
10   auto axis0 = model->addOperand(&type2);
11   auto output = model->addOperand(&type3);
12   // Phase 2, operations
13   static int32_t axis0_init[] = {0};
14   model->setOperandValue(axis0, axis0_init, sizeof(int32_t) * 1);
15   model->addOperation(ANEURALNETWORKS_CONCATENATION, {input1, input2, axis0}, {output});
16   // Phase 3, inputs and outputs
17   model->identifyInputsAndOutputs(
18     {input1, input2},
19     {output});
20   // Phase 4: set relaxed execution
21   model->relaxComputationFloat32toFloat16(true);
22   assert(model->isValid());
23 }
24 
is_ignored(int i)25 bool is_ignored(int i) {
26   static std::set<int> ignore = {};
27   return ignore.find(i) != ignore.end();
28 }
29