diff --git a/lite/demo/cxx/x86_mobilenetv1_light_demo/mobilenet_light_api.cc b/lite/demo/cxx/x86_mobilenetv1_light_demo/mobilenet_light_api.cc index 17997a228f03d84ab23638df9b64ae30ef844861..763a3fe8871398dda37e5302d24b8cf1659cf6ce 100644 --- a/lite/demo/cxx/x86_mobilenetv1_light_demo/mobilenet_light_api.cc +++ b/lite/demo/cxx/x86_mobilenetv1_light_demo/mobilenet_light_api.cc @@ -24,10 +24,10 @@ int64_t ShapeProduction(const shape_t& shape) { return res; } -void RunModel(std::string model_dir) { +void RunModel(std::string model_name) { // 1. Create MobileConfig MobileConfig config; - config.set_model_dir(model_dir); + config.set_model_from_file(model_name); // 2. Create PaddlePredictor by CxxConfig std::shared_ptr predictor = CreatePaddlePredictor(config);