This will register two operators conversion and enable conversion
Signed-off-by: SaeHie Park <saehie.park@samsung.com>
auto graph = loco::make_graph();
- // TODO convert tf_graph_def
- for (const auto &n : tf_graph_def.node())
- {
- if (const auto *graph_builder = GraphBuilderRegistry::get().lookup(n.op()))
- {
- if (!graph_builder->validate(n))
- {
- throw std::runtime_error{"Invalid operator: " + n.op()};
- }
-
- // TODO call build
- }
- else
- {
- // TODO handle for not supported op
- }
- }
+ convert_graph(signature, tf_graph_def, graph.get());
return std::move(graph);
}
#include "GraphBuilder.h"
+#include "Op/Placeholder.h"
+#include "Op/Identity.h"
+
+#include <stdex/Memory.h>
+
#include <map>
#include <memory>
#include <string>
private:
GraphBuilderRegistry()
{
- // TODO fill in GraphBuilders
+ _builder_map["Placeholder"] = stdex::make_unique<PlaceholderGraphBuilder>();
+ _builder_map["Identity"] = stdex::make_unique<IdentityGraphBuilder>();
}
private: