-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Phi] Change the output format of C++ backward api (Part2) #42545
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
2a248c5
change the output format of C++ backward api
zyfncg a181c1b
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
zyfncg 004e791
fix merge conflict
zyfncg 6d5fdf4
fix sparse api code auto-gen
zyfncg 7ea2b71
fix eager_gen bug
zyfncg 25eba8d
fix bug of output is null
zyfncg a12b2ff
fix bug of conv2d_grad_impl
zyfncg c8c2fe2
fix optional grad
zyfncg 388dedd
fix bug of eager-gen double_grad
zyfncg 2c3e6f3
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
zyfncg 8395a96
fix bug
zyfncg 8bed60d
fix multiply_double_grad bug
zyfncg 2cbc708
fix bug of higher order derivative
zyfncg 0ace82d
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
zyfncg 6d0913d
fix bug of FillZeroForEmptyGradInput
zyfncg 53bb812
remove redundant vector in grad_node
zyfncg 2ab5b82
fix bug of test_deformable_conv_v1_op
zyfncg 28d45b1
fix bug of test_deformable_conv_v1_op
zyfncg 4390cd0
some refacotr
zyfncg fdfd6eb
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
zyfncg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -218,6 +218,8 @@ void GradNodeBase::SetGradOutMeta(const paddle::experimental::Tensor& fwd_in, | |
// Set Stop_gradient | ||
if (fwd_in_meta) { | ||
meta.SetStopGradient(fwd_in_meta->StopGradient()); | ||
} else { | ||
meta.SetStopGradient(true); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. default value is true There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
// Set Adj Edges | ||
if (fwd_in_meta && !fwd_in_meta->StopGradient()) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
高阶反向在使用
paddle.grad
时会出现某些反向节点分支不处理的情况,这种情况会给对应下一个节点的grad_in
填0,在对应的输入为optional时也需要这样的操作There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok