#include "moco/Import/GraphBuilderRegistry.h"
#include <moco/IR/Nodes/TFPlaceholder.h>
+#include <moco/IR/TFNode.h>
#include <moco/Log.h>
// 1. Convert all the nodes to loco::Node
// 2. Connect inputs: set all node input(from a string) to actual node object
// 3. Set graph input
- // 4. Create loco::Push node and set input and set graph output
+ // 4. Create moco::TFPush node and set graph output
/**
* @brief Prepare tensorflow::NodeDef search table from name
}
/**
- * @brief 4. Create loco::Push node and set graph input and output
+ * @brief 4. Create moco::TFPush node and set graph output
*/
for (auto output : signature.outputs())
{
auto output_node = tensor_names->node(output);
assert(output_node);
- // create loco::Push for output of graph
- auto push_node = graph->nodes()->create<loco::Push>();
- push_node->from(output_node); // set input of Push to output node
+ // create moco::TFPush for output of graph
+ auto push_node = graph->nodes()->create<moco::TFPush>();
+ push_node->from(output_node); // set input of TFPush to output node
// set the graph output name and node object
auto graph_output = graph->outputs()->create();
graph_output->name(output.nodeName());
+ push_node->index(graph_output->index());
+
// TODO Support other types
graph_output->dtype(loco::DataType::FLOAT32);
- loco::link(graph_output, push_node);
}
// validate graph