In Shape -> {Slice, Gather} -> Concat -> Reshape, when the dynamic axis coming from Shape is a single axis and the rest of the dimensions are not -1, we can replace the shape for Reshape to have a static -1 axis, and eliminate the nodes for dynamic shape evaluation.
In
Shape -> {Slice, Gather} -> Concat -> Reshape, when the dynamic axis coming from Shape is a single axis and the rest of the dimensions are not-1, we can replace the shape for Reshape to have a static-1axis, and eliminate the nodes for dynamic shape evaluation.