summaryrefslogtreecommitdiff
path: root/runtimes/tests/neural_networks_test/generated/models/lsh_projection_2.model.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'runtimes/tests/neural_networks_test/generated/models/lsh_projection_2.model.cpp')
-rw-r--r--runtimes/tests/neural_networks_test/generated/models/lsh_projection_2.model.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/runtimes/tests/neural_networks_test/generated/models/lsh_projection_2.model.cpp b/runtimes/tests/neural_networks_test/generated/models/lsh_projection_2.model.cpp
new file mode 100644
index 000000000..25e9d8b42
--- /dev/null
+++ b/runtimes/tests/neural_networks_test/generated/models/lsh_projection_2.model.cpp
@@ -0,0 +1,30 @@
+// Generated file (from: lsh_projection_2.mod.py). Do not edit
+void CreateModel(Model *model) {
+ OperandType type3(Type::INT32, {});
+ OperandType type2(Type::TENSOR_FLOAT32, {3});
+ OperandType type0(Type::TENSOR_FLOAT32, {4, 2});
+ OperandType type1(Type::TENSOR_INT32, {3, 2});
+ OperandType type4(Type::TENSOR_INT32, {4});
+ // Phase 1, operands
+ auto hash = model->addOperand(&type0);
+ auto lookup = model->addOperand(&type1);
+ auto weight = model->addOperand(&type2);
+ auto type_param = model->addOperand(&type3);
+ auto output = model->addOperand(&type4);
+ // Phase 2, operations
+ static float hash_init[] = {0.123f, 0.456f, -0.321f, -0.654f, 1.234f, 5.678f, -4.321f, -8.765f};
+ model->setOperandValue(hash, hash_init, sizeof(float) * 8);
+ static int32_t type_param_init[] = {1};
+ model->setOperandValue(type_param, type_param_init, sizeof(int32_t) * 1);
+ model->addOperation(ANEURALNETWORKS_LSH_PROJECTION, {hash, lookup, weight, type_param}, {output});
+ // Phase 3, inputs and outputs
+ model->identifyInputsAndOutputs(
+ {lookup, weight},
+ {output});
+ assert(model->isValid());
+}
+
+bool is_ignored(int i) {
+ static std::set<int> ignore = {};
+ return ignore.find(i) != ignore.end();
+}