X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=include%2FPredictorWrapper.h;h=18ea862e172bee6e828bbc1d530b04d23d22a504;hb=HEAD;hp=9ceb21ac29e4f1c95f17b7867a4f4064c9dc7feb;hpb=3aa517d206c44156fe86697aeadc5f75ea212329;p=trackerpp.git diff --git a/include/PredictorWrapper.h b/include/PredictorWrapper.h index 9ceb21a..18ea862 100644 --- a/include/PredictorWrapper.h +++ b/include/PredictorWrapper.h @@ -14,18 +14,14 @@ namespace suanzi { class PredictorWrapper { public: - static PredictorWrapperPtr create(const std::string& fname); + PredictorWrapper(const std::string& module="predictor", const std::string& pydir = "./python"); ~PredictorWrapper(){} void dump(); - double predict(int index, std::vector f); + double predict(int index, const std::vector& f); + bool load(const std::string& fname); // load pkl file private: - PredictorWrapper(const std::string& fname); - static PredictorWrapperWPtr instance; - - PY_FUN dump_func; - PY_FUN predict_func; - + boost::python::object m_module; }; }