I-Jui (Ray) Sung | 1b8fa4f | 2017-09-13 20:47:42 -0700 | [diff] [blame] | 1 | // Generated file (from: depth_to_space_quant8_2.mod.py). Do not edit |
| 2 | void CreateModel(Model *model) { |
| 3 | OperandType type1(Type::INT32, {}); |
Jean-Luc Brouillet | c5e342b | 2017-10-11 22:28:55 -0700 | [diff] [blame] | 4 | OperandType type0(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 4}, 0.5f, 0); |
| 5 | OperandType type2(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 1}, 0.5f, 0); |
I-Jui (Ray) Sung | 1b8fa4f | 2017-09-13 20:47:42 -0700 | [diff] [blame] | 6 | // Phase 1, operands |
| 7 | auto input = model->addOperand(&type0); |
| 8 | auto radius = model->addOperand(&type1); |
| 9 | auto output = model->addOperand(&type2); |
| 10 | // Phase 2, operations |
| 11 | static int32_t radius_init[] = {2}; |
| 12 | model->setOperandValue(radius, radius_init, sizeof(int32_t) * 1); |
| 13 | model->addOperation(ANEURALNETWORKS_DEPTH_TO_SPACE, {input, radius}, {output}); |
| 14 | // Phase 3, inputs and outputs |
Jean-Luc Brouillet | 66d5cb6 | 2017-10-04 20:41:35 -0700 | [diff] [blame] | 15 | model->identifyInputsAndOutputs( |
I-Jui (Ray) Sung | 1b8fa4f | 2017-09-13 20:47:42 -0700 | [diff] [blame] | 16 | {input}, |
| 17 | {output}); |
| 18 | assert(model->isValid()); |
| 19 | } |
| 20 | |
| 21 | bool is_ignored(int i) { |
| 22 | static std::set<int> ignore = {}; |
| 23 | return ignore.find(i) != ignore.end(); |
| 24 | } |