The slice_like operator takes two inputs:
- Data tensor to be sliced.
- Tensor, from which shape will be used to slice input 1.
In many object detection networks, input 1 is a constant and the shape of input 2 is known statically. To perform this operation only the shape of input 2 is needed. However, the FoldConstant pass doesn’t know this and will see that since input 2 is not a constant, the operation will not be constant folded.
To fix this, I want to add a pass to simplify slice_like to strided_slice when the necessary shapes of input 2 are available statically. Any thoughts?