Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TensorFlow forward/backward #2

Open
reyoung opened this issue Jun 16, 2017 · 0 comments
Open

TensorFlow forward/backward #2

reyoung opened this issue Jun 16, 2017 · 0 comments

Comments

@reyoung
Copy link
Owner

reyoung commented Jun 16, 2017

注册函数 https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/ops/math_grad.cc#L85

  1. 设置最后一层的Gradient是1
  2. Sum Gradient 将所有Node节点的Gradient求和
  3. 如果所有的输入都不需要Gradient,break
  4. 如果输入也是NoGradient,Backward NoGradient
  5. 如果输入需要计算Gradient,但是输出中有一些NoGradient,将其Gradient设置为0
  6. 调用用户注册的函数,添加到Gradient中
  7. 添加dst_grad to pending_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant