piiswrong closed pull request #10683: update doc for grad in autograd.py
URL: https://github.com/apache/incubator-mxnet/pull/10683
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/python/mxnet/autograd.py b/python/mxnet/autograd.py
index c0f9a1b63c7..e5ddaf6a15c 100644
--- a/python/mxnet/autograd.py
+++ b/python/mxnet/autograd.py
@@ -305,8 +305,7 @@ def grad(heads, variables, head_grads=None,
retain_graph=None, create_graph=Fals
>>> with mx.autograd.record():
... z = mx.nd.elemwise_add(mx.nd.exp(x), x)
>>> dx = mx.autograd.grad(z, [x], create_graph=True)
- >>> dx.backward()
- >>> print(dx.grad)
+ >>> print(dx)
[
[ 3.71828175]
<NDArray 1 @cpu(0)>]
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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