X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=include%2FPredictorWrapper.h;h=18ea862e172bee6e828bbc1d530b04d23d22a504;hb=97b147e9106cb549dd7dd62829b9d29b326738c7;hp=c41a8bca6907dca5763a210baa45bc401c4bafb6;hpb=db369d962b595544373b417ae9a76e7268eb12fb;p=trackerpp.git diff --git a/include/PredictorWrapper.h b/include/PredictorWrapper.h index c41a8bc..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& python_dir, const std::string& model_dir); // model.pkl file + PredictorWrapper(const std::string& module="predictor", const std::string& pydir = "./python"); ~PredictorWrapper(){} void dump(); double predict(int index, const std::vector& f); + bool load(const std::string& fname); // load pkl file private: - PredictorWrapper(const std::string& py_dir, const std::string& fname); - static PredictorWrapperWPtr instance; - - PY_FUN dump_func; - PY_FUN predict_func; - + boost::python::object m_module; }; }