DNXie opened a new issue #20128:
URL: https://github.com/apache/incubator-mxnet/issues/20128
## Description
`mxnet.ndarray.BatchNorm` crashes (aborts) with segmentation fault when one
of the following parameters is empty tensor:
- `gamma`
- `bata`
- `moving_mean`
- `moving_var`
### Error Message
~~~python
Segmentation fault: 11
Stack trace:
[bt] (0)
/root/miniconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(+0x3c27360)
[0x7f74fc906360]
terminate called after throwing an instance of 'std::system_error'
what(): Resource deadlock avoided
Aborted (core dumped)
~~~
## To Reproduce
Also check the
[gist](https://colab.research.google.com/drive/1yhXPhxEH36a7wh93I9Yshz5YPn01xUu9?usp=sharing)
~~~python
import mxnet
import numpy as np
data = mxnet.nd.ones((1,1,1))
beta = mxnet.nd.array(np.ones((1,1,1,0)))
gamma = mxnet.nd.array(np.ones((1,1,1,1)))
moving_mean = mxnet.nd.array(np.ones((1,1,1,1)))
moving_var = mxnet.nd.array(np.ones((1,1,1,1)))
mxnet.ndarray.BatchNorm(data=data, gamma=gamma, beta=beta,
moving_mean=moving_mean, moving_var=moving_var)
~~~
## Environment
OS: ubuntu 18.04
Python: 3.7.6
pip: 20.0.2
numpy: 1.18.5
mxnet: 1.7.0
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]