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

change clip grad api, test=develop #27767

Merged
merged 5 commits into from
Oct 9, 2020
Merged

Conversation

qili93
Copy link
Contributor

@qili93 qili93 commented Oct 8, 2020

PR types

Others

PR changes

APIs

Describe

三个API原有的need_clip输入为function,使用方式不够友好,修改三个API中不再使用need_clip参数;而通过在定义ParamAttr里增加need_clip=true/false参数(默认为true)的方式来决定某个参数是否要被裁剪,默认为全部裁剪。主要修改如下:

  1. 去掉GradientClipByValue三个API的need_clip参数,在ParamAttr里增加need_clip=true/false参数(默认为true)
  2. 名称统一改成ClipGradByXX的形式:GradientClipByValue -> ClipGradByValue
  3. 相应修改三个API的sample代码

Fluid Doc PR: PaddlePaddle/docs#2758

@paddle-bot-old
Copy link

paddle-bot-old bot commented Oct 8, 2020

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

@paddle-bot-old
Copy link

paddle-bot-old bot commented Oct 8, 2020

✅ This PR's description meets the template requirements!
Please wait for other CI results.

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@TCChenlong TCChenlong left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@hong19860320 hong19860320 left a comment

Choose a reason for hiding this comment

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

LGTM

@hong19860320 hong19860320 merged commit 994438b into PaddlePaddle:develop Oct 9, 2020
@qili93 qili93 deleted the clip_api branch October 9, 2020 05:22
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.

4 participants