1 // clang-format off
2 // Generated file (from: logistic_float_2_relaxed.mod.py). Do not edit
CreateModel(Model * model)3 void CreateModel(Model *model) {
4 OperandType type0(Type::TENSOR_FLOAT32, {2, 32, 40, 2});
5 // Phase 1, operands
6 auto input = model->addOperand(&type0);
7 auto output = model->addOperand(&type0);
8 // Phase 2, operations
9 model->addOperation(ANEURALNETWORKS_LOGISTIC, {input}, {output});
10 // Phase 3, inputs and outputs
11 model->identifyInputsAndOutputs(
12 {input},
13 {output});
14 // Phase 4: set relaxed execution
15 model->relaxComputationFloat32toFloat16(true);
16 assert(model->isValid());
17 }
18
is_ignored(int i)19 inline bool is_ignored(int i) {
20 static std::set<int> ignore = {};
21 return ignore.find(i) != ignore.end();
22 }
23
CreateModel_dynamic_output_shape(Model * model)24 void CreateModel_dynamic_output_shape(Model *model) {
25 OperandType type0(Type::TENSOR_FLOAT32, {2, 32, 40, 2});
26 OperandType type1(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
27 // Phase 1, operands
28 auto input = model->addOperand(&type0);
29 auto output = model->addOperand(&type1);
30 // Phase 2, operations
31 model->addOperation(ANEURALNETWORKS_LOGISTIC, {input}, {output});
32 // Phase 3, inputs and outputs
33 model->identifyInputsAndOutputs(
34 {input},
35 {output});
36 // Phase 4: set relaxed execution
37 model->relaxComputationFloat32toFloat16(true);
38 assert(model->isValid());
39 }
40
is_ignored_dynamic_output_shape(int i)41 inline bool is_ignored_dynamic_output_shape(int i) {
42 static std::set<int> ignore = {};
43 return ignore.find(i) != ignore.end();
44 }
45
46