From 867bda8f822283dc2d44859b043a291e7edd3ac8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=D0=93=D1=83=D1=81=D0=B5=D0=B2=20=D0=94=D0=BC=D0=B8=D1=82?= =?utf8?q?=D1=80=D0=B8=D0=B9=20=D0=92=D0=B8=D0=BA=D1=82=D0=BE=D1=80=D0=BE?= =?utf8?q?=D0=B2=D0=B8=D1=87/AI=20Tools=20Lab=20/SRR/Engineer/=EC=82=BC?= =?utf8?q?=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Mon, 30 Sep 2019 18:10:40 +0300 Subject: [PATCH] Expand [mir-caffe-importer] interface (#7850) Added new interface function loadModel in caffe importer Signed-off-by: Dmitry Gusev --- compiler/mir-caffe-importer/caffe_importer.cpp | 6 ++++++ compiler/mir-caffe-importer/caffe_importer.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/compiler/mir-caffe-importer/caffe_importer.cpp b/compiler/mir-caffe-importer/caffe_importer.cpp index 346b79e..fe0531e 100644 --- a/compiler/mir-caffe-importer/caffe_importer.cpp +++ b/compiler/mir-caffe-importer/caffe_importer.cpp @@ -36,6 +36,12 @@ namespace mir_caffe { +std::unique_ptr loadModel(std::string filename) +{ + CaffeImporter importer(std::move(filename)); + return importer.importModel(); +} + using namespace ::caffe; CaffeImporter::CaffeImporter(std::string filename) : _modelFilename(std::move(filename)) diff --git a/compiler/mir-caffe-importer/caffe_importer.h b/compiler/mir-caffe-importer/caffe_importer.h index 4fb609f..86fb834 100644 --- a/compiler/mir-caffe-importer/caffe_importer.h +++ b/compiler/mir-caffe-importer/caffe_importer.h @@ -86,6 +86,8 @@ private: void processDeprecatedInput(); }; +std::unique_ptr loadModel(std::string filename); + } // namespace mir_caffe #endif // MIR_CAFFE_IMPORTER_H -- 2.7.4