未验证 提交 c69514a1 编写于 作者: H huzhiqiang 提交者: GitHub

[demo] Fix cxx_demo (#2921)

上级 92a8cf4a
......@@ -27,10 +27,10 @@ int64_t ShapeProduction(const shape_t& shape) {
void RunModel(std::string model_dir) {
// 1. Set MobileConfig
MobileConfig config;
config.set_model_dir(model_dir);
// To load model transformed by opt after release/v2.3.0, plese use
// `set_model_from_file` listed below.
// config.set_model_from_file(model_dir);
config.set_model_from_file(model_dir);
// NOTE: To load model transformed by model_optimize_tool before
// release/v2.3.0, plese use `set_model_dir` API as listed below.
// config.set_model_dir(model_dir);
// 2. Create PaddlePredictor by MobileConfig
std::shared_ptr<PaddlePredictor> predictor =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册