I-Jui (Ray) Sung | d8b6b50 | 2017-09-13 20:00:58 -0700 | [diff] [blame] | 1 | // Generated code. Do not edit |
| 2 | // Create the model |
| 3 | Model createTestModel() { |
| 4 | const std::vector<Operand> operands = { |
| 5 | { |
| 6 | .type = OperandType::TENSOR_QUANT8_ASYMM, |
Jean-Luc Brouillet | e68d924 | 2017-10-04 00:49:53 -0700 | [diff] [blame] | 7 | .dimensions = {2, 64, 64, 2}, |
I-Jui (Ray) Sung | d8b6b50 | 2017-09-13 20:00:58 -0700 | [diff] [blame] | 8 | .numberOfConsumers = 1, |
| 9 | .scale = 1.0f, |
| 10 | .zeroPoint = 128, |
| 11 | .lifetime = OperandLifeTime::MODEL_INPUT, |
| 12 | .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| 13 | }, |
| 14 | { |
| 15 | .type = OperandType::TENSOR_QUANT8_ASYMM, |
Jean-Luc Brouillet | e68d924 | 2017-10-04 00:49:53 -0700 | [diff] [blame] | 16 | .dimensions = {2, 64, 64, 2}, |
I-Jui (Ray) Sung | d8b6b50 | 2017-09-13 20:00:58 -0700 | [diff] [blame] | 17 | .numberOfConsumers = 0, |
| 18 | .scale = 1.0f, |
| 19 | .zeroPoint = 128, |
| 20 | .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| 21 | .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| 22 | } |
| 23 | }; |
| 24 | |
| 25 | const std::vector<Operation> operations = { |
| 26 | { |
Dong Chen | 224c01e | 2017-10-03 10:38:55 -0700 | [diff] [blame] | 27 | .type = OperationType::RELU1, |
I-Jui (Ray) Sung | d8b6b50 | 2017-09-13 20:00:58 -0700 | [diff] [blame] | 28 | .inputs = {0}, |
| 29 | .outputs = {1}, |
| 30 | } |
| 31 | }; |
| 32 | |
| 33 | const std::vector<uint32_t> inputIndexes = {0}; |
| 34 | const std::vector<uint32_t> outputIndexes = {1}; |
| 35 | std::vector<uint8_t> operandValues = {}; |
| 36 | const std::vector<hidl_memory> pools = {}; |
| 37 | |
| 38 | return { |
| 39 | .operands = operands, |
| 40 | .operations = operations, |
| 41 | .inputIndexes = inputIndexes, |
| 42 | .outputIndexes = outputIndexes, |
| 43 | .operandValues = operandValues, |
| 44 | .pools = pools, |
| 45 | }; |
| 46 | } |
I-Jui (Ray) Sung | b6b3dc4 | 2017-09-13 18:50:37 -0700 | [diff] [blame] | 47 | |
Miao Wang | e8e5d34 | 2018-02-22 19:05:20 -0800 | [diff] [blame^] | 48 | |
I-Jui (Ray) Sung | b6b3dc4 | 2017-09-13 18:50:37 -0700 | [diff] [blame] | 49 | bool is_ignored(int i) { |
| 50 | static std::set<int> ignore = {}; |
| 51 | return ignore.find(i) != ignore.end(); |
| 52 | } |