#include "moco/Import/Nodes/Placeholder.h"
+#include <moco/IR/Nodes/TFPlaceholder.h>
+
#include <moco/Names.h>
#include <plier/tf/Convert.h>
// TODO support other types
assert(dtype == loco::DataType::FLOAT32);
- // Create a "pull" node as an input
- auto pull_node = graph->nodes()->create<loco::Pull>();
+ // Create a "Placeholder" node as an input
+ auto placeholder_node = graph->nodes()->create<moco::TFPlaceholder>();
- pull_node->dtype(dtype);
+ placeholder_node->dtype(dtype);
// Setting shape info.
- pull_node->rank(num_dims);
+ placeholder_node->rank(num_dims);
for (int64_t d = 0; d < num_dims; d++)
{
assert(shape.dim(d).size() < std::numeric_limits<uint32_t>::max());
if (dim_value >= 0)
{
uint32_t dim_value32 = static_cast<uint32_t>(dim_value);
- pull_node->dim(d) = dim_value32;
+ placeholder_node->dim(d) = dim_value32;
}
else
{
- pull_node->dim(d).unset();
+ placeholder_node->dim(d).unset();
// TODO Remove assert() and do implement
// NOTE Current implementation assumes dim is all know
assert(false);
// register string-name to node
TensorName output_name(node.name(), 0);
- tensor_names->enroll(output_name, pull_node);
+ tensor_names->enroll(output_name, placeholder_node);
}
} // namespace moco