-
Notifications
You must be signed in to change notification settings - Fork 6.8k
bug of NDarray.reshape #18886
Comments
I verified that this doesn't affect the |
@cs8105 congrats that you have found mxnet's built-in way of creating memory leaks🤦♂️ Joke aside, I think what we need here is a check for consistent size. the logic for ndarray can be found here: Would you like to open a PR to add a check that makes sure the size is consistent before and after the reshape, and raise ValueError otherwise? The process is described at https://cwiki.apache.org/confluence/display/MXNET/Git+Setup+and+Workflow |
I'm new so forgive my ignorance. The same bug seems to be present v2.0, shall I just give PR a go on the v2 branch? |
@r3stl355 you can open the PR against the master branch and v1.x branch |
This was fixed by #19095 few months ago and merged into v1.x branch but was not picked for 1.8 release. Should be closed. |
`
In [26]: import mxnet as mx
In [27]: mx.version
Out[27]: '1.6.0'
In [28]: nd = mx.nd
In [29]: a = nd.arange(27).reshape((3,3,3))
In [30]: a.reshape((3,3))
Out[30]:
[[0. 1. 2.]
[3. 4. 5.]
[6. 7. 8.]]
<NDArray 3x3 @cpu(0)>
`
the the old shape (3,3,3) and new shape (3,3) is not in the same size.
is there some special purpose for this?
The text was updated successfully, but these errors were encountered: