bgawrych opened a new pull request #18996:
URL: https://github.com/apache/incubator-mxnet/pull/18996
## Description ##
## Checklist ##
### Essentials ###
Please feel free to remove inapplicable items for your PR.
- [x] Changes are complete (i.e. I finished coding on this PR)
- [x] All changes have test coverage:
- Unit tests are added for small changes to verify correctness (e.g. adding
a new operator)
- [x] To the best of my knowledge, examples are either not affected by this
change, or have been fixed to be compatible with this change
## Comments ##
In numpy mode everything works fine.
NDArray mode throws:
```
File "leaky.py", line 5, in <module>
b = mx.ndarray.LeakyReLU(input)
File "<string>", line 72, in LeakyReLU
File
"/home/wihajster/Desktop/incubator-mxnet/python/mxnet/_ctypes/ndarray.py", line
82, in _imperative_invoke
check_call(_LIB.MXImperativeInvokeEx(
File "/home/wihajster/Desktop/incubator-mxnet/python/mxnet/base.py", line
246, in check_call
raise get_last_ffi_error()
mxnet.base.MXNetError: Traceback (most recent call last):
File "../src/imperative/imperative.cc", line 678
MXNetError: Check failed: shape_is_known(arr.shape()):
```
I think this is correct behavior, as legacy mode doesn’t let empty arrays.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]