1 // Generated file (from: svdf.mod.py). Do not edit
CreateModel(Model * model)2 void CreateModel(Model *model) {
3 OperandType type0(Type::TENSOR_FLOAT32, {2, 3});
4 OperandType type4(Type::TENSOR_FLOAT32, {2, 40});
5 OperandType type6(Type::TENSOR_FLOAT32, {2, 4});
6 OperandType type2(Type::TENSOR_FLOAT32, {4, 10});
7 OperandType type1(Type::TENSOR_FLOAT32, {4, 3});
8 OperandType type3(Type::TENSOR_FLOAT32, {4});
9 OperandType type5(Type::TENSOR_INT32, {1});
10 // Phase 1, operands
11 auto input = model->addOperand(&type0);
12 auto weights_feature = model->addOperand(&type1);
13 auto weights_time = model->addOperand(&type2);
14 auto bias = model->addOperand(&type3);
15 auto state_in = model->addOperand(&type4);
16 auto rank_param = model->addOperand(&type5);
17 auto activation_param = model->addOperand(&type5);
18 auto state_out = model->addOperand(&type4);
19 auto output = model->addOperand(&type6);
20 // Phase 2, operations
21 model->addOperation(ANEURALNETWORKS_SVDF, {input, weights_feature, weights_time, bias, state_in, rank_param, activation_param}, {state_out, output});
22 // Phase 3, inputs and outputs
23 model->identifyInputsAndOutputs(
24 {input, weights_feature, weights_time, bias, state_in, rank_param, activation_param},
25 {state_out, output});
26 assert(model->isValid());
27 }
28
is_ignored(int i)29 bool is_ignored(int i) {
30 static std::set<int> ignore = {0};
31 return ignore.find(i) != ignore.end();
32 }
33