You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
It would be quite useful to have an operator that can create ranges based on an existing 'shape_like' symbol, similar to the ops zeros_like, ones_like, and other *_like.
For example, I would like to enumerate the positions of a symbol with dynamic shape:
x=mx.sym.Variable('x')
r=mx.sym.arange_like(x, start=0)
r.eval(x=mx.nd.ones((4,))) # should give: [0, 1, 2, 3]r.eval(x=mx.nd.ones((2,))) # should give: [0, 1]r2=mx.sym.arange_like(x, start=5)
r.eval(x=mx.nd.ones((2, 2))) # should give: [[5, 6], [7, 8]]
Another name could be 'enumerate'.
The text was updated successfully, but these errors were encountered:
Hey, this is the MXNet Label Bot.
Thank you for submitting the issue! I will try and suggest some labels so that the appropriate MXNet community members can help resolve it.
Here are my recommended labels: Feature
fhieber
changed the title
Feature Request: 'arange_like' operator
Feature Request: 'arange_like/enumerate' operator
Mar 31, 2019
It would be quite useful to have an operator that can create ranges based on an existing 'shape_like' symbol, similar to the ops
zeros_like
,ones_like
, and other*_like
.For example, I would like to enumerate the positions of a symbol with dynamic shape:
Another name could be 'enumerate'.
The text was updated successfully, but these errors were encountered: