[mir/Caffe importer] Introduce `importModel` method (#5986)
authorСергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 <s.barannikov@samsung.com>
Mon, 29 Jul 2019 17:37:38 +0000 (20:37 +0300)
committerEfimov Alexander/AI Tools Lab/./Samsung Electronics <a.efimov@samsung.com>
Mon, 29 Jul 2019 17:37:38 +0000 (20:37 +0300)
Add `importModel` method as a future replacement for `import` and `createIR` methods.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
compiler/mir-caffe-importer/caffe_importer.cpp
compiler/mir-caffe-importer/caffe_importer.h

index 509c549..9d93aac 100644 (file)
@@ -88,6 +88,12 @@ Graph *CaffeImporter::createIR()
   return _graph;
 }
 
+std::unique_ptr<mir::Graph> CaffeImporter::importModel()
+{
+  import();
+  return std::unique_ptr<mir::Graph>(createIR());
+}
+
 void CaffeImporter::collectUnsupportedLayers()
 {
   processDeprecatedInput();
index cf4f663..4c7a65d 100644 (file)
@@ -36,6 +36,9 @@ public:
   void import();
   mir::Graph *createIR();
 
+  /// @brief Load the model and convert it into a MIR Graph.
+  std::unique_ptr<mir::Graph> importModel();
+
   void cleanup();
 
   ~CaffeImporter();