• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Generated file (from: transpose.mod.py). Do not edit
CreateModel(Model * model)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   assert(model->isValid());
18 }
19 
is_ignored(int i)20 bool is_ignored(int i) {
21   static std::set<int> ignore = {};
22   return ignore.find(i) != ignore.end();
23 }
24