This will enable shape inference of EltwiseSub and EltwiseDiv node
Signed-off-by: SaeHie Park <saehie.park@samsung.com>
NODE(FeatureBiasAdd)
NODE(EltwiseAdd)
NODE(EltwiseMul)
+ NODE(EltwiseSub)
+ NODE(EltwiseDiv)
#undef NODE
// TODO Put all the visit method implementations inside this class declaration
ShapeDescription visit(loco::ReLU6 *node) { return gd._node_to_shape[node->input()]; }
return lhs_shape;
}
+ShapeDescription ShapeGetter::visit(loco::EltwiseSub *node)
+{
+ const ShapeDescription &lhs_shape = gd._node_to_shape[node->lhs()];
+ const ShapeDescription &rhs_shape = gd._node_to_shape[node->rhs()];
+
+ assert(lhs_shape._dims == rhs_shape._dims);
+
+ return lhs_shape;
+}
+
+ShapeDescription ShapeGetter::visit(loco::EltwiseDiv *node)
+{
+ const ShapeDescription &lhs_shape = gd._node_to_shape[node->lhs()];
+ const ShapeDescription &rhs_shape = gd._node_to_shape[node->rhs()];
+
+ assert(lhs_shape._dims == rhs_shape._dims);
+
+ return lhs_shape;
+}
} // namespace
namespace