This will add to support ShapeInference for EltwiseAdd and EltwiseMul
Signed-off-by: SaeHie Park <saehie.park@samsung.com>
NODE(BiasEncode)
NODE(TensorBiasAdd)
NODE(FeatureBiasAdd)
+ NODE(EltwiseAdd)
+ NODE(EltwiseMul)
#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 value_shape;
}
+ShapeDescription ShapeGetter::visit(loco::EltwiseAdd *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::EltwiseMul *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