Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Upgrade nnvm to use automatic gradient correspondence guessing #3973

Merged
merged 2 commits into from
Nov 25, 2016

Conversation

tqchen
Copy link
Member

@tqchen tqchen commented Nov 25, 2016

head_grad_entry_.emplace_back(NodeEntry{nnvm::Node::Create(), 0, 0});
head_grad_map_[head_grad_entry_.back().node.get()] = i;
NodeEntry ngrad{nnvm::Node::Create(), 0, 0};
head_grad_entry_.emplace_back(AttrHint(ngrad, g.outputs[i]));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats this for?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for enforcing shape constraints in the gradient input. This is needed, in case some of the backward node is simply forward path, Say gradient of add returns an identity of ograd, and we need shape of the gradient input variable to start with

@sxjscience sxjscience mentioned this pull request Nov 25, 2016
@piiswrong
Copy link
Contributor

piiswrong commented Nov 25, 2016 via email

@tqchen
Copy link
Member Author

tqchen commented Nov 25, 2016

There is no is_backward field in the node. We used to have it, but concluded that is too artificial. Normal operator can also occur in gradient path, in which case is_backward is not registered, and normal shape inference function is used

@piiswrong piiswrong merged commit 11cea6c into apache:nnvm Nov 25, 2016
piiswrong pushed a commit that referenced this pull request Nov 30, 2016
* specific op for gradient aggregation

* Upgrade nnvm to use automatic gradient correspondence guessing
piiswrong pushed a commit that referenced this pull request Dec 11, 2016
* specific op for gradient aggregation

* Upgrade nnvm to use automatic gradient correspondence guessing
piiswrong pushed a commit to piiswrong/mxnet that referenced this pull request Dec 24, 2016
…e#3973)

* specific op for gradient aggregation

* Upgrade nnvm to use automatic gradient correspondence guessing
piiswrong pushed a commit to piiswrong/mxnet that referenced this pull request Dec 29, 2016
…e#3973)

* specific op for gradient aggregation

* Upgrade nnvm to use automatic gradient correspondence guessing
piiswrong pushed a commit to piiswrong/mxnet that referenced this pull request Dec 29, 2016
…e#3973)

* specific op for gradient aggregation

* Upgrade nnvm to use automatic gradient correspondence guessing
piiswrong pushed a commit that referenced this pull request Dec 29, 2016
* specific op for gradient aggregation

* Upgrade nnvm to use automatic gradient correspondence guessing
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants