[neurun] Fix load_model_from_file (#5928)
author이상규/On-Device Lab(SR)/Principal Engineer/삼성전자 <sg5.lee@samsung.com>
Fri, 26 Jul 2019 09:57:14 +0000 (18:57 +0900)
committer이한종/On-Device Lab(SR)/Engineer/삼성전자 <hanjoung.lee@samsung.com>
Fri, 26 Jul 2019 09:57:14 +0000 (18:57 +0900)
load_load_from_file should load model from {nnpackage path + model path}.

Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
runtimes/neurun/frontend/api/wrapper/nnfw_api.cc

index a392278..7856b9c 100644 (file)
@@ -52,7 +52,8 @@ NNFW_STATUS nnfw_session::load_model_from_file(const char *package_dir)
     auto model = nnfw::cpp14::make_unique<neurun::model::Model>();
     _graph = std::make_shared<neurun::graph::Graph>(std::move(model));
     tflite_loader::Loader loader(*_graph);
-    loader.loadFromFile(models[0].asString().c_str() /*first model*/);
+    auto model_file_path = package_dir + std::string("/") + models[0].asString(); // first model
+    loader.loadFromFile(model_file_path.c_str());
   }
   catch (...)
   {