ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
moco::Importer Class Referencefinal

#include <Importer.h>

Public Member Functions

 Importer ()
 
 Importer (const GraphBuilderSource *source)
 
std::unique_ptr< loco::Graphimport (const ModelSignature &, tensorflow::GraphDef &) const
 

Detailed Description

Definition at line 34 of file Importer.h.

Constructor & Destructor Documentation

◆ Importer() [1/2]

moco::Importer::Importer ( )

Definition at line 173 of file Importer.cpp.

174{
175 // DO NOTHING
176}

◆ Importer() [2/2]

moco::Importer::Importer ( const GraphBuilderSource source)
inlineexplicit

Definition at line 40 of file Importer.h.

40 : _source{source}
41 {
42 // DO NOTHING
43 }

Member Function Documentation

◆ import()

std::unique_ptr< loco::Graph > moco::Importer::import ( const ModelSignature signature,
tensorflow::GraphDef &  tf_graph_def 
) const

Definition at line 178 of file Importer.cpp.

180{
181 auto graph = loco::make_graph();
182
183 const GraphBuilderSource *source_ptr = &moco::GraphBuilderRegistry::get();
184
185 if (_source != nullptr)
186 {
187 // Use user-defined GraphBuilderSource
188 source_ptr = _source;
189 }
190
191 convert_graph(*source_ptr, signature, tf_graph_def, graph.get());
192
193 return graph;
194}
static GraphBuilderRegistry & get()
std::unique_ptr< Graph > make_graph(void)
Definition Graph.cpp:131

References moco::GraphBuilderRegistry::get(), and loco::make_graph().


The documentation for this class was generated from the following files: