Home | History | Annotate | Download | only in models
      1 // Generated file (from: space_to_batch_float_1_relaxed.mod.py). Do not edit
      2 void CreateModel(Model *model) {
      3   OperandType type0(Type::TENSOR_FLOAT32, {1, 4, 4, 1});
      4   OperandType type3(Type::TENSOR_FLOAT32, {4, 2, 2, 1});
      5   OperandType type2(Type::TENSOR_INT32, {2, 2});
      6   OperandType type1(Type::TENSOR_INT32, {2});
      7   // Phase 1, operands
      8   auto input = model->addOperand(&type0);
      9   auto block_size = model->addOperand(&type1);
     10   auto paddings = model->addOperand(&type2);
     11   auto output = model->addOperand(&type3);
     12   // Phase 2, operations
     13   static int32_t block_size_init[] = {2, 2};
     14   model->setOperandValue(block_size, block_size_init, sizeof(int32_t) * 2);
     15   static int32_t paddings_init[] = {0, 0, 0, 0};
     16   model->setOperandValue(paddings, paddings_init, sizeof(int32_t) * 4);
     17   model->addOperation(ANEURALNETWORKS_SPACE_TO_BATCH_ND, {input, block_size, paddings}, {output});
     18   // Phase 3, inputs and outputs
     19   model->identifyInputsAndOutputs(
     20     {input},
     21     {output});
     22   // Phase 4: set relaxed execution
     23   model->relaxComputationFloat32toFloat16(true);
     24   assert(model->isValid());
     25 }
     26 
     27 bool is_ignored(int i) {
     28   static std::set<int> ignore = {};
     29   return ignore.find(i) != ignore.end();
     30 }
     31