// // IfModule.hpp // MNN // // Created by MNN on 2020/09/01. // Copyright © 2018, Alibaba Group Holding Limited // #ifndef IfModule_hpp #define IfModule_hpp #include #include "core/Schedule.hpp" namespace MNN { namespace Express { class IfModule : public Module { public: virtual ~ IfModule() { // Do nothing } virtual std::vector onForward(const std::vector& inputs) override; static IfModule* create(const Op* op, const std::map& subGraph); private: IfModule(){} Module* clone(CloneContext* ctx) const override; // First mThen' index, Second: inputs's index std::vector> mInputForThen; // First mElse' index, Second: inputs's index std::vector> mInputForElse; std::vector mOutputFromThen; std::vector mOutputFromElse; std::shared_ptr mThen; std::shared_ptr mElse; }; } } #endif /* IfModule_hpp */