Zhi Zhang created MXNET-306:
-------------------------------

             Summary: Add slice_like operator
                 Key: MXNET-306
                 URL: https://issues.apache.org/jira/browse/MXNET-306
             Project: Apache MXNet
          Issue Type: Improvement
            Reporter: Zhi Zhang


slice_like operator used to crop a certain region inferred from second input.
```
Example::

x = [[ 1., 2., 3., 4.],
 [ 5., 6., 7., 8.],
 [ 9., 10., 11., 12.]]

y = [[ 0., 0., 0.],
 [ 0., 0., 0.]]

slice_like(x, y) = [[ 1., 2., 3.]
 [ 5., 6., 7.]]
 slice_like(x, y, axes=(0, 1)) = [[ 1., 2., 3.]
 [ 5., 6., 7.]]
 slice_like(x, y, axes=(0)) = [[ 1., 2., 3., 4.]
 [ 5., 6., 7., 8.]]
 slice_like(x, y, axes=(-1)) = [[ 1., 2., 3.]
 [ 5., 6., 7.]
 [ 9., 10., 11.]]
```



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@mxnet.apache.org
For additional commands, e-mail: issues-h...@mxnet.apache.org

Reply via email to