Skip to content

add check whether tensor is inplace and leaf when calculate gradient #37931

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

Merged

Conversation

MingMingShangTian
Copy link
Contributor

@MingMingShangTian MingMingShangTian commented Dec 7, 2021

PR types

New features

PR changes

APIs

Describe

PyLayer中, 增加了在Inplace 策略下,输入tensor 的stop_gradient为false 且同时为叶子节点的情况进行检查报错的逻辑。
该逻辑和现有Op 的Inplace 策略保持了一致。

@paddle-bot-old
Copy link

paddle-bot-old bot commented Dec 7, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@zyfncg zyfncg left a comment

Choose a reason for hiding this comment

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

LGTM

@MingMingShangTian MingMingShangTian merged commit 2c02a58 into PaddlePaddle:develop Dec 8, 2021
@MingMingShangTian MingMingShangTian deleted the add_assert_pylayer branch December 8, 2021 04:56
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

Successfully merging this pull request may close these issues.

3 participants