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, |
| 7 | .dimensions = {1, 1, 3, 3}, |
| 8 | .numberOfConsumers = 1, |
| 9 | .scale = 1.0f, |
| 10 | .zeroPoint = 0, |
| 11 | .lifetime = OperandLifeTime::MODEL_INPUT, |
| 12 | .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| 13 | }, |
| 14 | { |
| 15 | .type = OperandType::TENSOR_INT32, |
| 16 | .dimensions = {1}, |
| 17 | .numberOfConsumers = 1, |
| 18 | .scale = 0.0f, |
| 19 | .zeroPoint = 0, |
Miao Wang | bee07f7 | 2017-10-09 10:43:21 -0700 | [diff] [blame] | 20 | .lifetime = OperandLifeTime::CONSTANT_COPY, |
| 21 | .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
I-Jui (Ray) Sung | d8b6b50 | 2017-09-13 20:00:58 -0700 | [diff] [blame] | 22 | }, |
| 23 | { |
| 24 | .type = OperandType::TENSOR_QUANT8_ASYMM, |
| 25 | .dimensions = {9}, |
| 26 | .numberOfConsumers = 0, |
| 27 | .scale = 1.0f, |
| 28 | .zeroPoint = 0, |
| 29 | .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| 30 | .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| 31 | } |
| 32 | }; |
| 33 | |
| 34 | const std::vector<Operation> operations = { |
| 35 | { |
Jean-Luc Brouillet | 7d6ac90 | 2017-09-23 10:17:12 -0700 | [diff] [blame] | 36 | .type = OperationType::RESHAPE, |
I-Jui (Ray) Sung | d8b6b50 | 2017-09-13 20:00:58 -0700 | [diff] [blame] | 37 | .inputs = {0, 1}, |
| 38 | .outputs = {2}, |
| 39 | } |
| 40 | }; |
| 41 | |
Miao Wang | bee07f7 | 2017-10-09 10:43:21 -0700 | [diff] [blame] | 42 | const std::vector<uint32_t> inputIndexes = {0}; |
I-Jui (Ray) Sung | d8b6b50 | 2017-09-13 20:00:58 -0700 | [diff] [blame] | 43 | const std::vector<uint32_t> outputIndexes = {2}; |
Miao Wang | bee07f7 | 2017-10-09 10:43:21 -0700 | [diff] [blame] | 44 | std::vector<uint8_t> operandValues = { |
| 45 | 255, 255, 255, 255 |
| 46 | }; |
I-Jui (Ray) Sung | d8b6b50 | 2017-09-13 20:00:58 -0700 | [diff] [blame] | 47 | const std::vector<hidl_memory> pools = {}; |
| 48 | |
| 49 | return { |
| 50 | .operands = operands, |
| 51 | .operations = operations, |
| 52 | .inputIndexes = inputIndexes, |
| 53 | .outputIndexes = outputIndexes, |
| 54 | .operandValues = operandValues, |
| 55 | .pools = pools, |
| 56 | }; |
| 57 | } |
I-Jui (Ray) Sung | b6b3dc4 | 2017-09-13 18:50:37 -0700 | [diff] [blame] | 58 | |
Miao Wang | e8e5d34 | 2018-02-22 19:05:20 -0800 | [diff] [blame^] | 59 | |
I-Jui (Ray) Sung | b6b3dc4 | 2017-09-13 18:50:37 -0700 | [diff] [blame] | 60 | bool is_ignored(int i) { |
| 61 | static std::set<int> ignore = {}; |
| 62 | return ignore.find(i) != ignore.end(); |
| 63 | } |