summaryrefslogtreecommitdiff
path: root/runtimes/tests/neural_networks_test/generated/models/max_pool_quant8_2.model.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'runtimes/tests/neural_networks_test/generated/models/max_pool_quant8_2.model.cpp')
-rw-r--r--runtimes/tests/neural_networks_test/generated/models/max_pool_quant8_2.model.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/runtimes/tests/neural_networks_test/generated/models/max_pool_quant8_2.model.cpp b/runtimes/tests/neural_networks_test/generated/models/max_pool_quant8_2.model.cpp
new file mode 100644
index 000000000..2ce943466
--- /dev/null
+++ b/runtimes/tests/neural_networks_test/generated/models/max_pool_quant8_2.model.cpp
@@ -0,0 +1,33 @@
+// Generated file (from: max_pool_quant8_2.mod.py). Do not edit
+void CreateModel(Model *model) {
+ OperandType type1(Type::INT32, {});
+ OperandType type2(Type::TENSOR_QUANT8_ASYMM, {5, 2, 3, 3}, 0.5f, 0);
+ OperandType type0(Type::TENSOR_QUANT8_ASYMM, {5, 50, 70, 3}, 0.5f, 0);
+ // Phase 1, operands
+ auto i0 = model->addOperand(&type0);
+ auto stride = model->addOperand(&type1);
+ auto filter = model->addOperand(&type1);
+ auto padding = model->addOperand(&type1);
+ auto activation = model->addOperand(&type1);
+ auto output = model->addOperand(&type2);
+ // Phase 2, operations
+ static int32_t stride_init[] = {20};
+ model->setOperandValue(stride, stride_init, sizeof(int32_t) * 1);
+ static int32_t filter_init[] = {20};
+ model->setOperandValue(filter, filter_init, sizeof(int32_t) * 1);
+ static int32_t padding_init[] = {0};
+ model->setOperandValue(padding, padding_init, sizeof(int32_t) * 1);
+ static int32_t activation_init[] = {0};
+ model->setOperandValue(activation, activation_init, sizeof(int32_t) * 1);
+ model->addOperation(ANEURALNETWORKS_MAX_POOL_2D, {i0, padding, padding, padding, padding, stride, stride, filter, filter, activation}, {output});
+ // Phase 3, inputs and outputs
+ model->identifyInputsAndOutputs(
+ {i0},
+ {output});
+ assert(model->isValid());
+}
+
+bool is_ignored(int i) {
+ static std::set<int> ignore = {};
+ return ignore.find(i) != ignore.end();
+}