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/08/21 00:41:11 UTC

[GitHub] [incubator-mxnet] szha edited a comment on issue #18933: Floating point exception in mxnet.ndarray.InstanceNorm

szha edited a comment on issue #18933:
URL: https://github.com/apache/incubator-mxnet/issues/18933#issuecomment-677959144


   Confirmed that this issue also happens in numpy branch. Since instance norm was using a legacy operator interface, I will refactor it to use the new operator interface and register an npx namespace alias.
   
   ```
   from mxnet import np, npx
   
   npx.set_np()
   
   input = np.random.rand(0,1,1) # batch = 0
   gamma = np.random.rand(1)
   beta = np.random.rand(1)
   npx.instance_norm(input, gamma, beta)
   ```
   
   ```
   from mxnet import np, npx
   
   npx.set_np()
   
   input = np.random.rand(1,0,1) # channel = 0
   gamma = np.random.rand(1)
   beta = np.random.rand(1)
   npx.instance_norm(input, gamma, beta)
   ```


----------------------------------------------------------------
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