KexinFeng opened a new pull request #20500: URL: https://github.com/apache/incubator-mxnet/pull/20500
## Description ## The PR adds the support for fetching the gradients of intermediate variables in a computation graph. The motivation of this feature comes from this [issue](https://github.com/apache/incubator-mxnet/issues/11865). ## Checklist ## ### Essentials ### - [ ] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc) - [ ] Changes are complete (i.e. I finished coding on this PR) - [ ] All changes have test coverage - [ ] Code is well-documented ### Changes ### - [ ] Feature1, tests, (and when applicable, API doc) - [ ] Feature2, tests, (and when applicable, API doc) ## Comments ## - Interesting edge cases to note here: 1. the gradient-queried node is the output node, `z.retain_grad()`. 2. when it is used combined with detaching computation. - Note that `u.retain_grad()` is called outside the scope of ag.record(). Otherwise, `u.retain_grad()` would be recorded as operation and trigger building of computational node. This is conceptually not desired. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
