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