blob: 761f25734eb4aeebbdf108e668764171e02081be [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
Miao Wangbee07f72017-10-09 10:43:21 -070014 static uint8_t op2_init[] = {10, 20, 20, 20, 10};
15 model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 5);
16 static int32_t b0_init[] = {10};
17 model->setOperandValue(b0, b0_init, sizeof(int32_t) * 1);
Jean-Luc Brouillete68d9242017-10-04 00:49:53 -070018 static int32_t act_init[] = {0};
19 model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
20 model->addOperation(ANEURALNETWORKS_FULLY_CONNECTED, {op1, op2, b0, act}, {op3});
21 // Phase 3, inputs and outputs
Jean-Luc Brouillet66d5cb62017-10-04 20:41:35 -070022 model->identifyInputsAndOutputs(
Miao Wangbee07f72017-10-09 10:43:21 -070023 {op1},
Jean-Luc Brouillete68d9242017-10-04 00:49:53 -070024 {op3});
25 assert(model->isValid());
26}
27
28bool is_ignored(int i) {
29 static std::set<int> ignore = {};
30 return ignore.find(i) != ignore.end();
31}