depth_to_space_float_1.model.cpp revision 66d5cb6e3a90aefc8d545f6369080ab88de9d667
11b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung// Generated file (from: depth_to_space_float_1.mod.py). Do not edit 21b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sungvoid CreateModel(Model *model) { 31b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung OperandType type1(Type::INT32, {}); 41b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung OperandType type0(Type::TENSOR_FLOAT32, {1, 1, 1, 8}); 51b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung OperandType type2(Type::TENSOR_FLOAT32, {1, 2, 2, 2}); 61b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung // Phase 1, operands 71b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung auto input = model->addOperand(&type0); 81b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung auto radius = model->addOperand(&type1); 91b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung auto output = model->addOperand(&type2); 101b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung // Phase 2, operations 111b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung static int32_t radius_init[] = {2}; 121b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung model->setOperandValue(radius, radius_init, sizeof(int32_t) * 1); 131b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung model->addOperation(ANEURALNETWORKS_DEPTH_TO_SPACE, {input, radius}, {output}); 141b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung // Phase 3, inputs and outputs 1566d5cb6e3a90aefc8d545f6369080ab88de9d667Jean-Luc Brouillet model->identifyInputsAndOutputs( 161b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung {input}, 171b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung {output}); 181b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung assert(model->isValid()); 191b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung} 201b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung 211b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sungbool is_ignored(int i) { 221b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung static std::set<int> ignore = {}; 231b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung return ignore.find(i) != ignore.end(); 241b8fa4fb29e498173f6b7992344a24bce447de82I-Jui (Ray) Sung} 25