You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/05/20 17:52:33 UTC
[GitHub] [incubator-mxnet] sxjscience commented on issue #18373: [Numpy] The symbolic export of BatchNorm is wrong
sxjscience commented on issue #18373:
URL: https://github.com/apache/incubator-mxnet/issues/18373#issuecomment-631629163
I find that issue does not only happen in numpy but also exists in ndarray:
```python
import mxnet as mx
import json
import pprint
#mx.npx.set_np()
net = mx.gluon.nn.BatchNorm(epsilon=2E-5, axis=2)
net.hybridize()
net.initialize()
a = net(mx.nd.ones((10, 3, 5, 5)))
net.export('bnorm', 0)
with open('bnorm-symbol.json') as f:
dat = json.load(f)
pprint.pprint(dat)
```
Output:
```
{'attrs': {'__profiler_scope__': 'batchnorm0:',
'axis': '1',
'eps': '1e-05',
'fix_gamma': 'False',
'momentum': '0.9',
'use_global_stats': 'False'},
'inputs': [[0, 0, 0], [1, 0, 0], [2, 0, 0], [3, 0, 1], [4, 0, 1]],
'name': 'batchnorm0_fwd',
'op': 'BatchNorm'}]}
```
----------------------------------------------------------------
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:
users@infra.apache.org