25struct CircleIfOutGraphs
38 CircleIfOutGraphs ret_out;
44 auto circle_if = loco::must_cast<const luci::CircleIf *>(node->
input());
47 auto then_graph = circle_if->then_graph();
48 auto else_graph = circle_if->else_graph();
49 assert(then_graph !=
nullptr);
50 assert(else_graph !=
nullptr);
56 assert(then_outputs.size() == else_outputs.size());
57 assert(index <
static_cast<int32_t
>(then_outputs.size()));
59 auto then_out = loco::must_cast<luci::CircleOutput *>(then_outputs.at(index));
60 auto else_out = loco::must_cast<luci::CircleOutput *>(else_outputs.at(index));
62 auto then_graph_outputs = then_graph->outputs();
63 auto else_graph_outputs = else_graph->outputs();
64 assert(then_graph_outputs->size() == else_graph_outputs->size());
66 ret_out.then_graph_output = then_graph_outputs->at(then_out->index());
67 ret_out.else_graph_output = else_graph_outputs->at(else_out->index());
81 auto graphs = get_out_graphs(node);
82 assert(*graphs.then_graph_output->shape() == *graphs.else_graph_output->shape());
83 return *graphs.then_graph_output->shape();
90 auto graphs = get_out_graphs(node);
91 assert(graphs.then_graph_output->dtype() == graphs.else_graph_output->dtype());
92 return graphs.then_graph_output->dtype();
103 if (cloned !=
nullptr)
NodeContext * nodes(void)
Graph-level Output Metadata.
Derived * create(Args &&...args)
Virtual CIRCLEIFOUT in Circle.
loco::Node * input(void) const
int32_t index(void) const
luci::CircleNode * visit(const luci::CircleBCQFullyConnected *) final
loco::TensorShape visit(const luci::CircleNode *node) final
Default fallback.
loco::DataType visit(const luci::CircleNode *node) final
Default fallback.
std::vector< Node * > output_nodes(Graph *)
DataType
"scalar" value type
loco::GraphInputIndex index(const TFPlaceholder *node)