Home | History | Annotate | Download | only in models
      1 // clang-format off
      2 // Generated file (from: transpose_v1_2.mod.py). Do not edit
      3 void CreateModel(Model *model) {
      4   OperandType type0(Type::TENSOR_FLOAT32, {2, 2});
      5   OperandType type1(Type::TENSOR_INT32, {0});
      6   // Phase 1, operands
      7   auto input = model->addOperand(&type0);
      8   auto perms = model->addOperand(&type1);
      9   auto output = model->addOperand(&type0);
     10   // Phase 2, operations
     11   model->addOperation(ANEURALNETWORKS_TRANSPOSE, {input, perms}, {output});
     12   // Phase 3, inputs and outputs
     13   model->identifyInputsAndOutputs(
     14     {input, perms},
     15     {output});
     16   assert(model->isValid());
     17 }
     18 
     19 inline bool is_ignored(int i) {
     20   static std::set<int> ignore = {};
     21   return ignore.find(i) != ignore.end();
     22 }
     23 
     24 void CreateModel_relaxed(Model *model) {
     25   OperandType type0(Type::TENSOR_FLOAT32, {2, 2});
     26   OperandType type1(Type::TENSOR_INT32, {0});
     27   // Phase 1, operands
     28   auto input = model->addOperand(&type0);
     29   auto perms = model->addOperand(&type1);
     30   auto output = model->addOperand(&type0);
     31   // Phase 2, operations
     32   model->addOperation(ANEURALNETWORKS_TRANSPOSE, {input, perms}, {output});
     33   // Phase 3, inputs and outputs
     34   model->identifyInputsAndOutputs(
     35     {input, perms},
     36     {output});
     37   // Phase 4: set relaxed execution
     38   model->relaxComputationFloat32toFloat16(true);
     39   assert(model->isValid());
     40 }
     41 
     42 inline bool is_ignored_relaxed(int i) {
     43   static std::set<int> ignore = {};
     44   return ignore.find(i) != ignore.end();
     45 }
     46 
     47 void CreateModel_quant8(Model *model) {
     48   OperandType type1(Type::TENSOR_INT32, {0});
     49   OperandType type14(Type::TENSOR_QUANT8_ASYMM, {2, 2}, 0.5f, 0);
     50   // Phase 1, operands
     51   auto input = model->addOperand(&type14);
     52   auto perms = model->addOperand(&type1);
     53   auto output = model->addOperand(&type14);
     54   // Phase 2, operations
     55   model->addOperation(ANEURALNETWORKS_TRANSPOSE, {input, perms}, {output});
     56   // Phase 3, inputs and outputs
     57   model->identifyInputsAndOutputs(
     58     {input, perms},
     59     {output});
     60   assert(model->isValid());
     61 }
     62 
     63 inline bool is_ignored_quant8(int i) {
     64   static std::set<int> ignore = {};
     65   return ignore.find(i) != ignore.end();
     66 }
     67 
     68 void CreateModel_dynamic_output_shape(Model *model) {
     69   OperandType type0(Type::TENSOR_FLOAT32, {2, 2});
     70   OperandType type1(Type::TENSOR_INT32, {0});
     71   OperandType type15(Type::TENSOR_FLOAT32, {0, 0});
     72   // Phase 1, operands
     73   auto input = model->addOperand(&type0);
     74   auto perms = model->addOperand(&type1);
     75   auto output = model->addOperand(&type15);
     76   // Phase 2, operations
     77   model->addOperation(ANEURALNETWORKS_TRANSPOSE, {input, perms}, {output});
     78   // Phase 3, inputs and outputs
     79   model->identifyInputsAndOutputs(
     80     {input, perms},
     81     {output});
     82   assert(model->isValid());
     83 }
     84 
     85 inline bool is_ignored_dynamic_output_shape(int i) {
     86   static std::set<int> ignore = {};
     87   return ignore.find(i) != ignore.end();
     88 }
     89 
     90 void CreateModel_dynamic_output_shape_relaxed(Model *model) {
     91   OperandType type0(Type::TENSOR_FLOAT32, {2, 2});
     92   OperandType type1(Type::TENSOR_INT32, {0});
     93   OperandType type15(Type::TENSOR_FLOAT32, {0, 0});
     94   // Phase 1, operands
     95   auto input = model->addOperand(&type0);
     96   auto perms = model->addOperand(&type1);
     97   auto output = model->addOperand(&type15);
     98   // Phase 2, operations
     99   model->addOperation(ANEURALNETWORKS_TRANSPOSE, {input, perms}, {output});
    100   // Phase 3, inputs and outputs
    101   model->identifyInputsAndOutputs(
    102     {input, perms},
    103     {output});
    104   // Phase 4: set relaxed execution
    105   model->relaxComputationFloat32toFloat16(true);
    106   assert(model->isValid());
    107 }
    108 
    109 inline bool is_ignored_dynamic_output_shape_relaxed(int i) {
    110   static std::set<int> ignore = {};
    111   return ignore.find(i) != ignore.end();
    112 }
    113 
    114 void CreateModel_dynamic_output_shape_quant8(Model *model) {
    115   OperandType type1(Type::TENSOR_INT32, {0});
    116   OperandType type14(Type::TENSOR_QUANT8_ASYMM, {2, 2}, 0.5f, 0);
    117   OperandType type16(Type::TENSOR_QUANT8_ASYMM, {0, 0}, 0.5f, 0);
    118   // Phase 1, operands
    119   auto input = model->addOperand(&type14);
    120   auto perms = model->addOperand(&type1);
    121   auto output = model->addOperand(&type16);
    122   // Phase 2, operations
    123   model->addOperation(ANEURALNETWORKS_TRANSPOSE, {input, perms}, {output});
    124   // Phase 3, inputs and outputs
    125   model->identifyInputsAndOutputs(
    126     {input, perms},
    127     {output});
    128   assert(model->isValid());
    129 }
    130 
    131 inline bool is_ignored_dynamic_output_shape_quant8(int i) {
    132   static std::set<int> ignore = {};
    133   return ignore.find(i) != ignore.end();
    134 }
    135 
    136 void CreateModel_zero_sized(Model *model) {
    137   OperandType type1(Type::TENSOR_INT32, {0});
    138   OperandType type10(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
    139   OperandType type11(Type::TENSOR_FLOAT32, {0, 2, 2, 1});
    140   OperandType type12(Type::TENSOR_FLOAT32, {0, 1, 2, 2});
    141   OperandType type13(Type::TENSOR_INT32, {4});
    142   OperandType type2(Type::TENSOR_FLOAT32, {1, 2});
    143   OperandType type3(Type::TENSOR_FLOAT32, {1, 8});
    144   OperandType type4(Type::TENSOR_FLOAT32, {0});
    145   OperandType type5(Type::TENSOR_FLOAT32, {0, 4});
    146   OperandType type6(Type::TENSOR_INT32, {1});
    147   OperandType type7(Type::FLOAT32, {});
    148   OperandType type8(Type::INT32, {});
    149   OperandType type9(Type::BOOL, {});
    150   // Phase 1, operands
    151   auto scores = model->addOperand(&type2);
    152   auto roi = model->addOperand(&type3);
    153   auto param = model->addOperand(&type6);
    154   auto param1 = model->addOperand(&type7);
    155   auto param2 = model->addOperand(&type8);
    156   auto param3 = model->addOperand(&type8);
    157   auto param4 = model->addOperand(&type7);
    158   auto param5 = model->addOperand(&type7);
    159   auto param6 = model->addOperand(&type7);
    160   auto scoresOut = model->addOperand(&type4);
    161   auto roiOut = model->addOperand(&type5);
    162   auto classesOut = model->addOperand(&type1);
    163   auto batchSplitOut = model->addOperand(&type1);
    164   auto in = model->addOperand(&type10);
    165   auto param7 = model->addOperand(&type8);
    166   auto param8 = model->addOperand(&type8);
    167   auto param9 = model->addOperand(&type7);
    168   auto param10 = model->addOperand(&type7);
    169   auto param11 = model->addOperand(&type8);
    170   auto param12 = model->addOperand(&type8);
    171   auto layout = model->addOperand(&type9);
    172   auto featureMap = model->addOperand(&type11);
    173   auto param13 = model->addOperand(&type13);
    174   auto out = model->addOperand(&type12);
    175   // Phase 2, operations
    176   static float scores_init[] = {0.9f, 0.1f};
    177   model->setOperandValue(scores, scores_init, sizeof(float) * 2);
    178   static float roi_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
    179   model->setOperandValue(roi, roi_init, sizeof(float) * 8);
    180   static int32_t param_init[] = {0};
    181   model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
    182   static float param1_init[] = {0.3f};
    183   model->setOperandValue(param1, param1_init, sizeof(float) * 1);
    184   static int32_t param2_init[] = {-1};
    185   model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
    186   static int32_t param3_init[] = {0};
    187   model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
    188   static float param4_init[] = {0.4f};
    189   model->setOperandValue(param4, param4_init, sizeof(float) * 1);
    190   static float param5_init[] = {1.0f};
    191   model->setOperandValue(param5, param5_init, sizeof(float) * 1);
    192   static float param6_init[] = {0.3f};
    193   model->setOperandValue(param6, param6_init, sizeof(float) * 1);
    194   static int32_t param7_init[] = {2};
    195   model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
    196   static int32_t param8_init[] = {2};
    197   model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
    198   static float param9_init[] = {2.0f};
    199   model->setOperandValue(param9, param9_init, sizeof(float) * 1);
    200   static float param10_init[] = {2.0f};
    201   model->setOperandValue(param10, param10_init, sizeof(float) * 1);
    202   static int32_t param11_init[] = {4};
    203   model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
    204   static int32_t param12_init[] = {4};
    205   model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
    206   static bool8 layout_init[] = {false};
    207   model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
    208   static int32_t param13_init[] = {0, 3, 1, 2};
    209   model->setOperandValue(param13, param13_init, sizeof(int32_t) * 4);
    210   model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param, param1, param2, param3, param4, param5, param6}, {scoresOut, roiOut, classesOut, batchSplitOut});
    211   model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param7, param8, param9, param10, param11, param12, layout}, {featureMap});
    212   model->addOperation(ANEURALNETWORKS_TRANSPOSE, {featureMap, param13}, {out});
    213   // Phase 3, inputs and outputs
    214   model->identifyInputsAndOutputs(
    215     {in},
    216     {scoresOut, classesOut, out});
    217   assert(model->isValid());
    218 }
    219 
    220 inline bool is_ignored_zero_sized(int i) {
    221   static std::set<int> ignore = {};
    222   return ignore.find(i) != ignore.end();
    223 }
    224 
    225 void CreateModel_zero_sized_relaxed(Model *model) {
    226   OperandType type1(Type::TENSOR_INT32, {0});
    227   OperandType type10(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
    228   OperandType type11(Type::TENSOR_FLOAT32, {0, 2, 2, 1});
    229   OperandType type12(Type::TENSOR_FLOAT32, {0, 1, 2, 2});
    230   OperandType type13(Type::TENSOR_INT32, {4});
    231   OperandType type2(Type::TENSOR_FLOAT32, {1, 2});
    232   OperandType type3(Type::TENSOR_FLOAT32, {1, 8});
    233   OperandType type4(Type::TENSOR_FLOAT32, {0});
    234   OperandType type5(Type::TENSOR_FLOAT32, {0, 4});
    235   OperandType type6(Type::TENSOR_INT32, {1});
    236   OperandType type7(Type::FLOAT32, {});
    237   OperandType type8(Type::INT32, {});
    238   OperandType type9(Type::BOOL, {});
    239   // Phase 1, operands
    240   auto scores = model->addOperand(&type2);
    241   auto roi = model->addOperand(&type3);
    242   auto param = model->addOperand(&type6);
    243   auto param1 = model->addOperand(&type7);
    244   auto param2 = model->addOperand(&type8);
    245   auto param3 = model->addOperand(&type8);
    246   auto param4 = model->addOperand(&type7);
    247   auto param5 = model->addOperand(&type7);
    248   auto param6 = model->addOperand(&type7);
    249   auto scoresOut = model->addOperand(&type4);
    250   auto roiOut = model->addOperand(&type5);
    251   auto classesOut = model->addOperand(&type1);
    252   auto batchSplitOut = model->addOperand(&type1);
    253   auto in = model->addOperand(&type10);
    254   auto param7 = model->addOperand(&type8);
    255   auto param8 = model->addOperand(&type8);
    256   auto param9 = model->addOperand(&type7);
    257   auto param10 = model->addOperand(&type7);
    258   auto param11 = model->addOperand(&type8);
    259   auto param12 = model->addOperand(&type8);
    260   auto layout = model->addOperand(&type9);
    261   auto featureMap = model->addOperand(&type11);
    262   auto param13 = model->addOperand(&type13);
    263   auto out = model->addOperand(&type12);
    264   // Phase 2, operations
    265   static float scores_init[] = {0.9f, 0.1f};
    266   model->setOperandValue(scores, scores_init, sizeof(float) * 2);
    267   static float roi_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
    268   model->setOperandValue(roi, roi_init, sizeof(float) * 8);
    269   static int32_t param_init[] = {0};
    270   model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
    271   static float param1_init[] = {0.3f};
    272   model->setOperandValue(param1, param1_init, sizeof(float) * 1);
    273   static int32_t param2_init[] = {-1};
    274   model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
    275   static int32_t param3_init[] = {0};
    276   model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
    277   static float param4_init[] = {0.4f};
    278   model->setOperandValue(param4, param4_init, sizeof(float) * 1);
    279   static float param5_init[] = {1.0f};
    280   model->setOperandValue(param5, param5_init, sizeof(float) * 1);
    281   static float param6_init[] = {0.3f};
    282   model->setOperandValue(param6, param6_init, sizeof(float) * 1);
    283   static int32_t param7_init[] = {2};
    284   model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
    285   static int32_t param8_init[] = {2};
    286   model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
    287   static float param9_init[] = {2.0f};
    288   model->setOperandValue(param9, param9_init, sizeof(float) * 1);
    289   static float param10_init[] = {2.0f};
    290   model->setOperandValue(param10, param10_init, sizeof(float) * 1);
    291   static int32_t param11_init[] = {4};
    292   model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
    293   static int32_t param12_init[] = {4};
    294   model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
    295   static bool8 layout_init[] = {false};
    296   model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
    297   static int32_t param13_init[] = {0, 3, 1, 2};
    298   model->setOperandValue(param13, param13_init, sizeof(int32_t) * 4);
    299   model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param, param1, param2, param3, param4, param5, param6}, {scoresOut, roiOut, classesOut, batchSplitOut});
    300   model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param7, param8, param9, param10, param11, param12, layout}, {featureMap});
    301   model->addOperation(ANEURALNETWORKS_TRANSPOSE, {featureMap, param13}, {out});
    302   // Phase 3, inputs and outputs
    303   model->identifyInputsAndOutputs(
    304     {in},
    305     {scoresOut, classesOut, out});
    306   // Phase 4: set relaxed execution
    307   model->relaxComputationFloat32toFloat16(true);
    308   assert(model->isValid());
    309 }
    310 
    311 inline bool is_ignored_zero_sized_relaxed(int i) {
    312   static std::set<int> ignore = {};
    313   return ignore.find(i) != ignore.end();
    314 }
    315 
    316 void CreateModel_zero_sized_quant8(Model *model) {
    317   OperandType type1(Type::TENSOR_INT32, {0});
    318   OperandType type13(Type::TENSOR_INT32, {4});
    319   OperandType type17(Type::TENSOR_QUANT8_ASYMM, {0, 2, 2, 1}, 0.1f, 128);
    320   OperandType type18(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.1f, 128);
    321   OperandType type19(Type::TENSOR_QUANT8_ASYMM, {0, 1, 2, 2}, 0.1f, 128);
    322   OperandType type20(Type::TENSOR_QUANT16_ASYMM, {1, 8}, 0.125f, 0);
    323   OperandType type21(Type::TENSOR_QUANT16_ASYMM, {0, 4}, 0.125f, 0);
    324   OperandType type22(Type::TENSOR_QUANT8_ASYMM, {1, 2}, 0.1f, 128);
    325   OperandType type23(Type::TENSOR_QUANT8_ASYMM, {0}, 0.1f, 128);
    326   OperandType type6(Type::TENSOR_INT32, {1});
    327   OperandType type7(Type::FLOAT32, {});
    328   OperandType type8(Type::INT32, {});
    329   OperandType type9(Type::BOOL, {});
    330   // Phase 1, operands
    331   auto scores = model->addOperand(&type22);
    332   auto roi = model->addOperand(&type20);
    333   auto param = model->addOperand(&type6);
    334   auto param1 = model->addOperand(&type7);
    335   auto param2 = model->addOperand(&type8);
    336   auto param3 = model->addOperand(&type8);
    337   auto param4 = model->addOperand(&type7);
    338   auto param5 = model->addOperand(&type7);
    339   auto param6 = model->addOperand(&type7);
    340   auto scoresOut = model->addOperand(&type23);
    341   auto roiOut = model->addOperand(&type21);
    342   auto classesOut = model->addOperand(&type1);
    343   auto batchSplitOut = model->addOperand(&type1);
    344   auto in = model->addOperand(&type18);
    345   auto param7 = model->addOperand(&type8);
    346   auto param8 = model->addOperand(&type8);
    347   auto param9 = model->addOperand(&type7);
    348   auto param10 = model->addOperand(&type7);
    349   auto param11 = model->addOperand(&type8);
    350   auto param12 = model->addOperand(&type8);
    351   auto layout = model->addOperand(&type9);
    352   auto featureMap = model->addOperand(&type17);
    353   auto param13 = model->addOperand(&type13);
    354   auto out = model->addOperand(&type19);
    355   // Phase 2, operations
    356   static uint8_t scores_init[] = {137, 129};
    357   model->setOperandValue(scores, scores_init, sizeof(uint8_t) * 2);
    358   static uint16_t roi_init[] = {8, 8, 80, 80, 0, 0, 80, 80};
    359   model->setOperandValue(roi, roi_init, sizeof(uint16_t) * 8);
    360   static int32_t param_init[] = {0};
    361   model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
    362   static float param1_init[] = {0.3f};
    363   model->setOperandValue(param1, param1_init, sizeof(float) * 1);
    364   static int32_t param2_init[] = {-1};
    365   model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
    366   static int32_t param3_init[] = {0};
    367   model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
    368   static float param4_init[] = {0.4f};
    369   model->setOperandValue(param4, param4_init, sizeof(float) * 1);
    370   static float param5_init[] = {1.0f};
    371   model->setOperandValue(param5, param5_init, sizeof(float) * 1);
    372   static float param6_init[] = {0.3f};
    373   model->setOperandValue(param6, param6_init, sizeof(float) * 1);
    374   static int32_t param7_init[] = {2};
    375   model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
    376   static int32_t param8_init[] = {2};
    377   model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
    378   static float param9_init[] = {2.0f};
    379   model->setOperandValue(param9, param9_init, sizeof(float) * 1);
    380   static float param10_init[] = {2.0f};
    381   model->setOperandValue(param10, param10_init, sizeof(float) * 1);
    382   static int32_t param11_init[] = {4};
    383   model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
    384   static int32_t param12_init[] = {4};
    385   model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
    386   static bool8 layout_init[] = {false};
    387   model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
    388   static int32_t param13_init[] = {0, 3, 1, 2};
    389   model->setOperandValue(param13, param13_init, sizeof(int32_t) * 4);
    390   model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param, param1, param2, param3, param4, param5, param6}, {scoresOut, roiOut, classesOut, batchSplitOut});
    391   model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param7, param8, param9, param10, param11, param12, layout}, {featureMap});
    392   model->addOperation(ANEURALNETWORKS_TRANSPOSE, {featureMap, param13}, {out});
    393   // Phase 3, inputs and outputs
    394   model->identifyInputsAndOutputs(
    395     {in},
    396     {scoresOut, classesOut, out});
    397   assert(model->isValid());
    398 }
    399 
    400 inline bool is_ignored_zero_sized_quant8(int i) {
    401   static std::set<int> ignore = {};
    402   return ignore.find(i) != ignore.end();
    403 }
    404 
    405 void CreateModel_zero_sized_float16(Model *model) {
    406   OperandType type1(Type::TENSOR_INT32, {0});
    407   OperandType type13(Type::TENSOR_INT32, {4});
    408   OperandType type24(Type::TENSOR_FLOAT16, {0, 2, 2, 1});
    409   OperandType type25(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
    410   OperandType type26(Type::TENSOR_FLOAT16, {0, 1, 2, 2});
    411   OperandType type27(Type::FLOAT16, {});
    412   OperandType type28(Type::TENSOR_FLOAT16, {1, 8});
    413   OperandType type29(Type::TENSOR_FLOAT16, {0, 4});
    414   OperandType type30(Type::TENSOR_FLOAT16, {1, 2});
    415   OperandType type31(Type::TENSOR_FLOAT16, {0});
    416   OperandType type6(Type::TENSOR_INT32, {1});
    417   OperandType type8(Type::INT32, {});
    418   OperandType type9(Type::BOOL, {});
    419   // Phase 1, operands
    420   auto scores = model->addOperand(&type30);
    421   auto roi = model->addOperand(&type28);
    422   auto param = model->addOperand(&type6);
    423   auto param1 = model->addOperand(&type27);
    424   auto param2 = model->addOperand(&type8);
    425   auto param3 = model->addOperand(&type8);
    426   auto param4 = model->addOperand(&type27);
    427   auto param5 = model->addOperand(&type27);
    428   auto param6 = model->addOperand(&type27);
    429   auto scoresOut = model->addOperand(&type31);
    430   auto roiOut = model->addOperand(&type29);
    431   auto classesOut = model->addOperand(&type1);
    432   auto batchSplitOut = model->addOperand(&type1);
    433   auto in = model->addOperand(&type25);
    434   auto param7 = model->addOperand(&type8);
    435   auto param8 = model->addOperand(&type8);
    436   auto param9 = model->addOperand(&type27);
    437   auto param10 = model->addOperand(&type27);
    438   auto param11 = model->addOperand(&type8);
    439   auto param12 = model->addOperand(&type8);
    440   auto layout = model->addOperand(&type9);
    441   auto featureMap = model->addOperand(&type24);
    442   auto param13 = model->addOperand(&type13);
    443   auto out = model->addOperand(&type26);
    444   // Phase 2, operations
    445   static _Float16 scores_init[] = {0.8999999761581421f, 0.10000000149011612f};
    446   model->setOperandValue(scores, scores_init, sizeof(_Float16) * 2);
    447   static _Float16 roi_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
    448   model->setOperandValue(roi, roi_init, sizeof(_Float16) * 8);
    449   static int32_t param_init[] = {0};
    450   model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
    451   static _Float16 param1_init[] = {0.30000001192092896f};
    452   model->setOperandValue(param1, param1_init, sizeof(_Float16) * 1);
    453   static int32_t param2_init[] = {-1};
    454   model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
    455   static int32_t param3_init[] = {0};
    456   model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
    457   static _Float16 param4_init[] = {0.4000000059604645f};
    458   model->setOperandValue(param4, param4_init, sizeof(_Float16) * 1);
    459   static _Float16 param5_init[] = {1.0f};
    460   model->setOperandValue(param5, param5_init, sizeof(_Float16) * 1);
    461   static _Float16 param6_init[] = {0.30000001192092896f};
    462   model->setOperandValue(param6, param6_init, sizeof(_Float16) * 1);
    463   static int32_t param7_init[] = {2};
    464   model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
    465   static int32_t param8_init[] = {2};
    466   model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
    467   static _Float16 param9_init[] = {2.0f};
    468   model->setOperandValue(param9, param9_init, sizeof(_Float16) * 1);
    469   static _Float16 param10_init[] = {2.0f};
    470   model->setOperandValue(param10, param10_init, sizeof(_Float16) * 1);
    471   static int32_t param11_init[] = {4};
    472   model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
    473   static int32_t param12_init[] = {4};
    474   model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
    475   static bool8 layout_init[] = {false};
    476   model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
    477   static int32_t param13_init[] = {0, 3, 1, 2};
    478   model->setOperandValue(param13, param13_init, sizeof(int32_t) * 4);
    479   model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param, param1, param2, param3, param4, param5, param6}, {scoresOut, roiOut, classesOut, batchSplitOut});
    480   model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param7, param8, param9, param10, param11, param12, layout}, {featureMap});
    481   model->addOperation(ANEURALNETWORKS_TRANSPOSE, {featureMap, param13}, {out});
    482   // Phase 3, inputs and outputs
    483   model->identifyInputsAndOutputs(
    484     {in},
    485     {scoresOut, classesOut, out});
    486   assert(model->isValid());
    487 }
    488 
    489 inline bool is_ignored_zero_sized_float16(int i) {
    490   static std::set<int> ignore = {};
    491   return ignore.find(i) != ignore.end();
    492 }
    493 
    494 void CreateModel_zero_sized_dynamic_output_shape(Model *model) {
    495   OperandType type1(Type::TENSOR_INT32, {0});
    496   OperandType type10(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
    497   OperandType type11(Type::TENSOR_FLOAT32, {0, 2, 2, 1});
    498   OperandType type13(Type::TENSOR_INT32, {4});
    499   OperandType type2(Type::TENSOR_FLOAT32, {1, 2});
    500   OperandType type3(Type::TENSOR_FLOAT32, {1, 8});
    501   OperandType type32(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
    502   OperandType type4(Type::TENSOR_FLOAT32, {0});
    503   OperandType type5(Type::TENSOR_FLOAT32, {0, 4});
    504   OperandType type6(Type::TENSOR_INT32, {1});
    505   OperandType type7(Type::FLOAT32, {});
    506   OperandType type8(Type::INT32, {});
    507   OperandType type9(Type::BOOL, {});
    508   // Phase 1, operands
    509   auto scores = model->addOperand(&type2);
    510   auto roi = model->addOperand(&type3);
    511   auto param = model->addOperand(&type6);
    512   auto param1 = model->addOperand(&type7);
    513   auto param2 = model->addOperand(&type8);
    514   auto param3 = model->addOperand(&type8);
    515   auto param4 = model->addOperand(&type7);
    516   auto param5 = model->addOperand(&type7);
    517   auto param6 = model->addOperand(&type7);
    518   auto scoresOut = model->addOperand(&type4);
    519   auto roiOut = model->addOperand(&type5);
    520   auto classesOut = model->addOperand(&type1);
    521   auto batchSplitOut = model->addOperand(&type1);
    522   auto in = model->addOperand(&type10);
    523   auto param7 = model->addOperand(&type8);
    524   auto param8 = model->addOperand(&type8);
    525   auto param9 = model->addOperand(&type7);
    526   auto param10 = model->addOperand(&type7);
    527   auto param11 = model->addOperand(&type8);
    528   auto param12 = model->addOperand(&type8);
    529   auto layout = model->addOperand(&type9);
    530   auto featureMap = model->addOperand(&type11);
    531   auto param13 = model->addOperand(&type13);
    532   auto out = model->addOperand(&type32);
    533   // Phase 2, operations
    534   static float scores_init[] = {0.9f, 0.1f};
    535   model->setOperandValue(scores, scores_init, sizeof(float) * 2);
    536   static float roi_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
    537   model->setOperandValue(roi, roi_init, sizeof(float) * 8);
    538   static int32_t param_init[] = {0};
    539   model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
    540   static float param1_init[] = {0.3f};
    541   model->setOperandValue(param1, param1_init, sizeof(float) * 1);
    542   static int32_t param2_init[] = {-1};
    543   model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
    544   static int32_t param3_init[] = {0};
    545   model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
    546   static float param4_init[] = {0.4f};
    547   model->setOperandValue(param4, param4_init, sizeof(float) * 1);
    548   static float param5_init[] = {1.0f};
    549   model->setOperandValue(param5, param5_init, sizeof(float) * 1);
    550   static float param6_init[] = {0.3f};
    551   model->setOperandValue(param6, param6_init, sizeof(float) * 1);
    552   static int32_t param7_init[] = {2};
    553   model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
    554   static int32_t param8_init[] = {2};
    555   model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
    556   static float param9_init[] = {2.0f};
    557   model->setOperandValue(param9, param9_init, sizeof(float) * 1);
    558   static float param10_init[] = {2.0f};
    559   model->setOperandValue(param10, param10_init, sizeof(float) * 1);
    560   static int32_t param11_init[] = {4};
    561   model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
    562   static int32_t param12_init[] = {4};
    563   model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
    564   static bool8 layout_init[] = {false};
    565   model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
    566   static int32_t param13_init[] = {0, 3, 1, 2};
    567   model->setOperandValue(param13, param13_init, sizeof(int32_t) * 4);
    568   model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param, param1, param2, param3, param4, param5, param6}, {scoresOut, roiOut, classesOut, batchSplitOut});
    569   model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param7, param8, param9, param10, param11, param12, layout}, {featureMap});
    570   model->addOperation(ANEURALNETWORKS_TRANSPOSE, {featureMap, param13}, {out});
    571   // Phase 3, inputs and outputs
    572   model->identifyInputsAndOutputs(
    573     {in},
    574     {scoresOut, classesOut, out});
    575   assert(model->isValid());
    576 }
    577 
    578 inline bool is_ignored_zero_sized_dynamic_output_shape(int i) {
    579   static std::set<int> ignore = {};
    580   return ignore.find(i) != ignore.end();
    581 }
    582 
    583 void CreateModel_zero_sized_dynamic_output_shape_relaxed(Model *model) {
    584   OperandType type1(Type::TENSOR_INT32, {0});
    585   OperandType type10(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
    586   OperandType type11(Type::TENSOR_FLOAT32, {0, 2, 2, 1});
    587   OperandType type13(Type::TENSOR_INT32, {4});
    588   OperandType type2(Type::TENSOR_FLOAT32, {1, 2});
    589   OperandType type3(Type::TENSOR_FLOAT32, {1, 8});
    590   OperandType type32(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
    591   OperandType type4(Type::TENSOR_FLOAT32, {0});
    592   OperandType type5(Type::TENSOR_FLOAT32, {0, 4});
    593   OperandType type6(Type::TENSOR_INT32, {1});
    594   OperandType type7(Type::FLOAT32, {});
    595   OperandType type8(Type::INT32, {});
    596   OperandType type9(Type::BOOL, {});
    597   // Phase 1, operands
    598   auto scores = model->addOperand(&type2);
    599   auto roi = model->addOperand(&type3);
    600   auto param = model->addOperand(&type6);
    601   auto param1 = model->addOperand(&type7);
    602   auto param2 = model->addOperand(&type8);
    603   auto param3 = model->addOperand(&type8);
    604   auto param4 = model->addOperand(&type7);
    605   auto param5 = model->addOperand(&type7);
    606   auto param6 = model->addOperand(&type7);
    607   auto scoresOut = model->addOperand(&type4);
    608   auto roiOut = model->addOperand(&type5);
    609   auto classesOut = model->addOperand(&type1);
    610   auto batchSplitOut = model->addOperand(&type1);
    611   auto in = model->addOperand(&type10);
    612   auto param7 = model->addOperand(&type8);
    613   auto param8 = model->addOperand(&type8);
    614   auto param9 = model->addOperand(&type7);
    615   auto param10 = model->addOperand(&type7);
    616   auto param11 = model->addOperand(&type8);
    617   auto param12 = model->addOperand(&type8);
    618   auto layout = model->addOperand(&type9);
    619   auto featureMap = model->addOperand(&type11);
    620   auto param13 = model->addOperand(&type13);
    621   auto out = model->addOperand(&type32);
    622   // Phase 2, operations
    623   static float scores_init[] = {0.9f, 0.1f};
    624   model->setOperandValue(scores, scores_init, sizeof(float) * 2);
    625   static float roi_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
    626   model->setOperandValue(roi, roi_init, sizeof(float) * 8);
    627   static int32_t param_init[] = {0};
    628   model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
    629   static float param1_init[] = {0.3f};
    630   model->setOperandValue(param1, param1_init, sizeof(float) * 1);
    631   static int32_t param2_init[] = {-1};
    632   model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
    633   static int32_t param3_init[] = {0};
    634   model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
    635   static float param4_init[] = {0.4f};
    636   model->setOperandValue(param4, param4_init, sizeof(float) * 1);
    637   static float param5_init[] = {1.0f};
    638   model->setOperandValue(param5, param5_init, sizeof(float) * 1);
    639   static float param6_init[] = {0.3f};
    640   model->setOperandValue(param6, param6_init, sizeof(float) * 1);
    641   static int32_t param7_init[] = {2};
    642   model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
    643   static int32_t param8_init[] = {2};
    644   model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
    645   static float param9_init[] = {2.0f};
    646   model->setOperandValue(param9, param9_init, sizeof(float) * 1);
    647   static float param10_init[] = {2.0f};
    648   model->setOperandValue(param10, param10_init, sizeof(float) * 1);
    649   static int32_t param11_init[] = {4};
    650   model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
    651   static int32_t param12_init[] = {4};
    652   model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
    653   static bool8 layout_init[] = {false};
    654   model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
    655   static int32_t param13_init[] = {0, 3, 1, 2};
    656   model->setOperandValue(param13, param13_init, sizeof(int32_t) * 4);
    657   model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param, param1, param2, param3, param4, param5, param6}, {scoresOut, roiOut, classesOut, batchSplitOut});
    658   model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param7, param8, param9, param10, param11, param12, layout}, {featureMap});
    659   model->addOperation(ANEURALNETWORKS_TRANSPOSE, {featureMap, param13}, {out});
    660   // Phase 3, inputs and outputs
    661   model->identifyInputsAndOutputs(
    662     {in},
    663     {scoresOut, classesOut, out});
    664   // Phase 4: set relaxed execution
    665   model->relaxComputationFloat32toFloat16(true);
    666   assert(model->isValid());
    667 }
    668 
    669 inline bool is_ignored_zero_sized_dynamic_output_shape_relaxed(int i) {
    670   static std::set<int> ignore = {};
    671   return ignore.find(i) != ignore.end();
    672 }
    673 
    674 void CreateModel_zero_sized_dynamic_output_shape_quant8(Model *model) {
    675   OperandType type1(Type::TENSOR_INT32, {0});
    676   OperandType type13(Type::TENSOR_INT32, {4});
    677   OperandType type17(Type::TENSOR_QUANT8_ASYMM, {0, 2, 2, 1}, 0.1f, 128);
    678   OperandType type18(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.1f, 128);
    679   OperandType type20(Type::TENSOR_QUANT16_ASYMM, {1, 8}, 0.125f, 0);
    680   OperandType type21(Type::TENSOR_QUANT16_ASYMM, {0, 4}, 0.125f, 0);
    681   OperandType type22(Type::TENSOR_QUANT8_ASYMM, {1, 2}, 0.1f, 128);
    682   OperandType type23(Type::TENSOR_QUANT8_ASYMM, {0}, 0.1f, 128);
    683   OperandType type33(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 128);
    684   OperandType type6(Type::TENSOR_INT32, {1});
    685   OperandType type7(Type::FLOAT32, {});
    686   OperandType type8(Type::INT32, {});
    687   OperandType type9(Type::BOOL, {});
    688   // Phase 1, operands
    689   auto scores = model->addOperand(&type22);
    690   auto roi = model->addOperand(&type20);
    691   auto param = model->addOperand(&type6);
    692   auto param1 = model->addOperand(&type7);
    693   auto param2 = model->addOperand(&type8);
    694   auto param3 = model->addOperand(&type8);
    695   auto param4 = model->addOperand(&type7);
    696   auto param5 = model->addOperand(&type7);
    697   auto param6 = model->addOperand(&type7);
    698   auto scoresOut = model->addOperand(&type23);
    699   auto roiOut = model->addOperand(&type21);
    700   auto classesOut = model->addOperand(&type1);
    701   auto batchSplitOut = model->addOperand(&type1);
    702   auto in = model->addOperand(&type18);
    703   auto param7 = model->addOperand(&type8);
    704   auto param8 = model->addOperand(&type8);
    705   auto param9 = model->addOperand(&type7);
    706   auto param10 = model->addOperand(&type7);
    707   auto param11 = model->addOperand(&type8);
    708   auto param12 = model->addOperand(&type8);
    709   auto layout = model->addOperand(&type9);
    710   auto featureMap = model->addOperand(&type17);
    711   auto param13 = model->addOperand(&type13);
    712   auto out = model->addOperand(&type33);
    713   // Phase 2, operations
    714   static uint8_t scores_init[] = {137, 129};
    715   model->setOperandValue(scores, scores_init, sizeof(uint8_t) * 2);
    716   static uint16_t roi_init[] = {8, 8, 80, 80, 0, 0, 80, 80};
    717   model->setOperandValue(roi, roi_init, sizeof(uint16_t) * 8);
    718   static int32_t param_init[] = {0};
    719   model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
    720   static float param1_init[] = {0.3f};
    721   model->setOperandValue(param1, param1_init, sizeof(float) * 1);
    722   static int32_t param2_init[] = {-1};
    723   model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
    724   static int32_t param3_init[] = {0};
    725   model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
    726   static float param4_init[] = {0.4f};
    727   model->setOperandValue(param4, param4_init, sizeof(float) * 1);
    728   static float param5_init[] = {1.0f};
    729   model->setOperandValue(param5, param5_init, sizeof(float) * 1);
    730   static float param6_init[] = {0.3f};
    731   model->setOperandValue(param6, param6_init, sizeof(float) * 1);
    732   static int32_t param7_init[] = {2};
    733   model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
    734   static int32_t param8_init[] = {2};
    735   model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
    736   static float param9_init[] = {2.0f};
    737   model->setOperandValue(param9, param9_init, sizeof(float) * 1);
    738   static float param10_init[] = {2.0f};
    739   model->setOperandValue(param10, param10_init, sizeof(float) * 1);
    740   static int32_t param11_init[] = {4};
    741   model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
    742   static int32_t param12_init[] = {4};
    743   model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
    744   static bool8 layout_init[] = {false};
    745   model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
    746   static int32_t param13_init[] = {0, 3, 1, 2};
    747   model->setOperandValue(param13, param13_init, sizeof(int32_t) * 4);
    748   model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param, param1, param2, param3, param4, param5, param6}, {scoresOut, roiOut, classesOut, batchSplitOut});
    749   model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param7, param8, param9, param10, param11, param12, layout}, {featureMap});
    750   model->addOperation(ANEURALNETWORKS_TRANSPOSE, {featureMap, param13}, {out});
    751   // Phase 3, inputs and outputs
    752   model->identifyInputsAndOutputs(
    753     {in},
    754     {scoresOut, classesOut, out});
    755   assert(model->isValid());
    756 }
    757 
    758 inline bool is_ignored_zero_sized_dynamic_output_shape_quant8(int i) {
    759   static std::set<int> ignore = {};
    760   return ignore.find(i) != ignore.end();
    761 }
    762 
    763 void CreateModel_zero_sized_dynamic_output_shape_float16(Model *model) {
    764   OperandType type1(Type::TENSOR_INT32, {0});
    765   OperandType type13(Type::TENSOR_INT32, {4});
    766   OperandType type24(Type::TENSOR_FLOAT16, {0, 2, 2, 1});
    767   OperandType type25(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
    768   OperandType type27(Type::FLOAT16, {});
    769   OperandType type28(Type::TENSOR_FLOAT16, {1, 8});
    770   OperandType type29(Type::TENSOR_FLOAT16, {0, 4});
    771   OperandType type30(Type::TENSOR_FLOAT16, {1, 2});
    772   OperandType type34(Type::TENSOR_FLOAT16, {0});
    773   OperandType type35(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
    774   OperandType type6(Type::TENSOR_INT32, {1});
    775   OperandType type8(Type::INT32, {});
    776   OperandType type9(Type::BOOL, {});
    777   // Phase 1, operands
    778   auto scores = model->addOperand(&type30);
    779   auto roi = model->addOperand(&type28);
    780   auto param = model->addOperand(&type6);
    781   auto param1 = model->addOperand(&type27);
    782   auto param2 = model->addOperand(&type8);
    783   auto param3 = model->addOperand(&type8);
    784   auto param4 = model->addOperand(&type27);
    785   auto param5 = model->addOperand(&type27);
    786   auto param6 = model->addOperand(&type27);
    787   auto scoresOut = model->addOperand(&type34);
    788   auto roiOut = model->addOperand(&type29);
    789   auto classesOut = model->addOperand(&type1);
    790   auto batchSplitOut = model->addOperand(&type1);
    791   auto in = model->addOperand(&type25);
    792   auto param7 = model->addOperand(&type8);
    793   auto param8 = model->addOperand(&type8);
    794   auto param9 = model->addOperand(&type27);
    795   auto param10 = model->addOperand(&type27);
    796   auto param11 = model->addOperand(&type8);
    797   auto param12 = model->addOperand(&type8);
    798   auto layout = model->addOperand(&type9);
    799   auto featureMap = model->addOperand(&type24);
    800   auto param13 = model->addOperand(&type13);
    801   auto out = model->addOperand(&type35);
    802   // Phase 2, operations
    803   static _Float16 scores_init[] = {0.8999999761581421f, 0.10000000149011612f};
    804   model->setOperandValue(scores, scores_init, sizeof(_Float16) * 2);
    805   static _Float16 roi_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
    806   model->setOperandValue(roi, roi_init, sizeof(_Float16) * 8);
    807   static int32_t param_init[] = {0};
    808   model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
    809   static _Float16 param1_init[] = {0.30000001192092896f};
    810   model->setOperandValue(param1, param1_init, sizeof(_Float16) * 1);
    811   static int32_t param2_init[] = {-1};
    812   model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
    813   static int32_t param3_init[] = {0};
    814   model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
    815   static _Float16 param4_init[] = {0.4000000059604645f};
    816   model->setOperandValue(param4, param4_init, sizeof(_Float16) * 1);
    817   static _Float16 param5_init[] = {1.0f};
    818   model->setOperandValue(param5, param5_init, sizeof(_Float16) * 1);
    819   static _Float16 param6_init[] = {0.30000001192092896f};
    820   model->setOperandValue(param6, param6_init, sizeof(_Float16) * 1);
    821   static int32_t param7_init[] = {2};
    822   model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
    823   static int32_t param8_init[] = {2};
    824   model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
    825   static _Float16 param9_init[] = {2.0f};
    826   model->setOperandValue(param9, param9_init, sizeof(_Float16) * 1);
    827   static _Float16 param10_init[] = {2.0f};
    828   model->setOperandValue(param10, param10_init, sizeof(_Float16) * 1);
    829   static int32_t param11_init[] = {4};
    830   model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
    831   static int32_t param12_init[] = {4};
    832   model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
    833   static bool8 layout_init[] = {false};
    834   model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
    835   static int32_t param13_init[] = {0, 3, 1, 2};
    836   model->setOperandValue(param13, param13_init, sizeof(int32_t) * 4);
    837   model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param, param1, param2, param3, param4, param5, param6}, {scoresOut, roiOut, classesOut, batchSplitOut});
    838   model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param7, param8, param9, param10, param11, param12, layout}, {featureMap});
    839   model->addOperation(ANEURALNETWORKS_TRANSPOSE, {featureMap, param13}, {out});
    840   // Phase 3, inputs and outputs
    841   model->identifyInputsAndOutputs(
    842     {in},
    843     {scoresOut, classesOut, out});
    844   assert(model->isValid());
    845 }
    846 
    847 inline bool is_ignored_zero_sized_dynamic_output_shape_float16(int i) {
    848   static std::set<int> ignore = {};
    849   return ignore.find(i) != ignore.end();
    850 }
    851 
    852