• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Generated file (from: fully_connected_quant8_large_weights_as_inputs.mod.py). Do not edit
CreateModel(Model * model)2 void CreateModel(Model *model) {
3   OperandType type3(Type::INT32, {});
4   OperandType type1(Type::TENSOR_INT32, {1}, 0.04, 0);
5   OperandType type2(Type::TENSOR_QUANT8_ASYMM, {1, 1}, 1.f, 0);
6   OperandType type0(Type::TENSOR_QUANT8_ASYMM, {1, 5}, 0.2, 0);
7   // 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
18   model->identifyInputsAndOutputs(
19     {op1, op2, b0},
20     {op3});
21   assert(model->isValid());
22 }
23 
is_ignored(int i)24 bool is_ignored(int i) {
25   static std::set<int> ignore = {};
26   return ignore.find(i) != ignore.end();
27 }
28