sxjscience commented on a change in pull request #18876:
URL: https://github.com/apache/incubator-mxnet/pull/18876#discussion_r467322411
##########
File path: python/mxnet/symbol/numpy/_symbol.py
##########
@@ -8012,7 +8012,7 @@ def diagonal(a, offset=0, axis1=0, axis2=1):
# pylint:disable=redefined-outer-name, too-many-arguments
@set_module('mxnet.symbol.numpy')
-def sum(a, axis=None, dtype=None, out=None, keepdims=None, initial=None,
where=None):
+def sum(a, axis=None, dtype=None, out=None, keepdims=False, initial=None,
where=None):
Review comment:
@szha Figured out a bug in `symbol.sum` which does not hybridization.
Minimal reproducible:
```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.sum(x)
foo = Foo()
foo.hybridize()
out = foo(mx.np.ones((10, 10)))
out.asnumpy()
```
----------------------------------------------------------------
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]