27 assert(original_shape.
rank() >= 2);
32 for (uint i = 0; i < ret.
rank(); ++i)
34 ret.
dim(i) = original_shape.
dim(i);
41 bool zero_found =
false;
43 for (uint32_t axis = 0; axis < shape.
rank(); ++axis)
45 const auto &dim = shape.
dim(axis);
46 if (dim.known() && dim.value() == 0)
55void throw_unless(
bool condition_result,
const char *exception_msg)
57 if (not condition_result)
131 const auto adj_x = node->
adj_x();
132 const auto adj_y = node->
adj_y();
#define INTERNAL_EXN(msg)
@ brief throw internal exception with message
The value of one dimension in a tensor shape.
const Dimension & dim(uint32_t axis) const
uint32_t rank(void) const
loco::Node * y(void) const
loco::Node * x(void) const
loco::TensorShape visit(const luci::CircleNode *node) final
Default fallback.
const luci_interpreter::RuntimeShape output_shape
T must_cast(FeatureEncoder *node)
A helper dynamic_cast that throws when failed.
loco::TensorShape broadcast_shape(const loco::TensorShape &x, const loco::TensorShape &y)
loco::TensorShape circle_shape(const luci::CircleNode *node)
T must_cast(loco::Node *node)