szha commented 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 = mxnet.nd.array(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:
[email protected]


Reply via email to