blob: ec18a16d3e78e246183ac580c13cfeb1c06a5870 [file] [log] [blame]
Jean-Luc Brouillete68d9242017-10-04 00:49:53 -07001// Generated file (from: fully_connected_quant8_large.mod.py). Do not edit
2void CreateModel(Model *model) {
3 OperandType type3(Type::INT32, {});
Miao Wang238a8802017-10-04 17:35:03 -07004 OperandType type1(Type::TENSOR_INT32, {1}, 0.04, 0);
Jean-Luc Brouillete68d9242017-10-04 00:49:53 -07005 OperandType type2(Type::TENSOR_QUANT8_ASYMM, {1, 1}, 1.f, 0);
6 OperandType type0(Type::TENSOR_QUANT8_ASYMM, {1, 5}, 0.2, 0);
Jean-Luc Brouillete68d9242017-10-04 00:49:53 -07007 // Phase 1, operands
8 auto op1 = model->addOperand(&type0);
9 auto op2 = model->addOperand(&type0);
10 auto b0 = model->addOperand(&type1);
11 auto op3 = model->addOperand(&type2);
12 auto act = model->addOperand(&type3);
13 // Phase 2, operations
14 static int32_t act_init[] = {0};
15 model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
16 model->addOperation(ANEURALNETWORKS_FULLY_CONNECTED, {op1, op2, b0, act}, {op3});
17 // Phase 3, inputs and outputs
Jean-Luc Brouillet66d5cb62017-10-04 20:41:35 -070018 model->identifyInputsAndOutputs(
Jean-Luc Brouillete68d9242017-10-04 00:49:53 -070019 {op1, op2, b0},
20 {op3});
21 assert(model->isValid());
22}
23
24bool is_ignored(int i) {
25 static std::set<int> ignore = {};
26 return ignore.find(i) != ignore.end();
27}