sxjscience opened a new issue #18878:
URL: https://github.com/apache/incubator-mxnet/issues/18878
Minimal reproducible example:
```python
import mxnet as mx
from mxnet.gluon.nn import HybridBlock
mx.npx.set_np()
class Foo(HybridBlock):
def hybrid_forward(self, F, x):
return F.np.mean(x, keepdims=None)
foo = Foo()
foo.hybridize()
out = foo(mx.np.ones((10, 10)))
out.asnumpy()
```
Output:
```
MXNetError: MXNetError: Invalid Parameter format for keepdims expect boolean
but value='None', in operator _npi_mean(name="", __profiler_scope__="foo0:",
axis="None", keepdims="None")
```
The root cause is that we should revise
https://github.com/apache/incubator-mxnet/blob/dde635f8c7666e205816da8ca4e519d0d213523f/src/operator/numpy/np_broadcast_reduce_op.h#L43
to use `dmlc::optional<bool>`.
----------------------------------------------------------------
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]