// // InitNet.hpp // MNN // // Created by MNN on 2018/09/08. // Copyright © 2018, Alibaba Group Holding Limited // #ifndef CORE_INITNET_HPP #define CORE_INITNET_HPP #include "MNN_generated.h" #include "core/TensorUtils.hpp" #include "core/Schedule.hpp" namespace MNN { class FileLoader; MNN_PUBLIC bool needComputeOp(const Op* op); MNN_PUBLIC bool initConstTensors(std::vector>& tensors, const Net* net, Backend* defaultBackend, ErrorCode& code, FileLoader* external); // init Tensors by net MNN_PUBLIC bool initTensors(std::vector>& allTensors, const Net* net, const int* oplists = nullptr, size_t opListSize = 0); // init Pipeline Infos by oplist and tensors MNN_PUBLIC void initPipelineInfosFromOps(std::vector& infos, std::vector& ops, const std::vector>& allTensors); // set input and output for allTensors by ops info void setInputOutputForOps(std::vector>& allTensors, const std::vector& ops, bool isStatic = false); bool computeShapeForBlob(const Blob* parameter, Tensor* output); } // namespace MNN #endif