From c69514a1e2c5ebc62c923849fc394265a4d83055 Mon Sep 17 00:00:00 2001 From: huzhiqiang <912790387@qq.com> Date: Wed, 19 Feb 2020 15:16:55 +0800 Subject: [PATCH] [demo] Fix cxx_demo (#2921) --- lite/demo/cxx/mobile_light/mobilenetv1_light_api.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lite/demo/cxx/mobile_light/mobilenetv1_light_api.cc b/lite/demo/cxx/mobile_light/mobilenetv1_light_api.cc index 9d923cb87d..1f7c4522f1 100644 --- a/lite/demo/cxx/mobile_light/mobilenetv1_light_api.cc +++ b/lite/demo/cxx/mobile_light/mobilenetv1_light_api.cc @@ -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 predictor = -- GitLab