Home | History | Annotate | Download | only in models
      1 // Generated file (from: space_to_batch_quant8_1.mod.py). Do not edit
      2 void CreateModel(Model *model) {
      3   OperandType type2(Type::TENSOR_INT32, {2, 2});
      4   OperandType type1(Type::TENSOR_INT32, {2});
      5   OperandType type0(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 1}, 1.0, 0);
      6   OperandType type3(Type::TENSOR_QUANT8_ASYMM, {4, 2, 2, 1}, 1.0, 0);
      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   assert(model->isValid());
     23 }
     24 
     25 bool is_ignored(int i) {
     26   static std::set<int> ignore = {};
     27   return ignore.find(i) != ignore.end();
     28 }
     29