fhieber opened a new issue #13862: [Bug] unravel_index no longer works with magic '-1' in shape parameter after 1.3.1 URL: https://github.com/apache/incubator-mxnet/issues/13862 ## Description The `unravel_index` op seems to no longer correctly work with 'magic' shape values, such as '-1's. The following example still works with mxnet 1.3.1, but does not on latest master (it returns all zeros in the result without throwing an error). I don't know when this was introduced, whether its present in the 1.4 rc or was changed later. We have a [use case](https://github.com/awslabs/sockeye/blob/master/sockeye/inference.py#L2100) for this in Sockeye. ## Environment info (Required) macOs MXNet commit hash: pip-installed: mxnet 1.5.0b20190111 ## Minimum reproducible example Input data taken from Sockete unit tests. ```python x = mx.nd.array([335, 620, 593, 219, 36], dtype='int32') mx.nd.unravel_index(x, shape=(-1, 200)) ``` With mxnet==1.5.0b20190111, the result is incorrect: ```python [[ 0 0 0 0 0] [135 20 193 19 36]] <NDArray 2x5 @cpu(0)> ``` With mxnet==1.3.1, the result is correct: ```python [[ 1 3 2 1 0] [135 20 193 19 36]] <NDArray 2x5 @cpu(0)> ``` However, if the shape parameter is fully specified (`shape=(5,200)`), `mxnet==1.5.0b20190111` returns the correct values.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
