sxjscience commented on issue #18078: A possible bug when computing a gradient 
vector
URL: 
https://github.com/apache/incubator-mxnet/issues/18078#issuecomment-614406630
 
 
   @zleyk22 Yes, it's a bug and also exists in numpy.
   ```python
   import mxnet as mx
   mx.npx.set_np()
   a = mx.np.array([1,0])
   a.attach_grad()
   with mx.autograd.record():
       b = mx.np.prod(a)
       b.backward()
   print(a.grad)
   ```
   Output:
   ```
   [ 0. nan]
   ```

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


With regards,
Apache Git Services

Reply via email to