-
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
Add the ReLU6, Tanhshrink, SELU, Softplus, Softshrink and Softsign for the api 2.0 #26376
Merged
hong19860320
merged 13 commits into
PaddlePaddle:develop
from
hong19860320:hongming/fix_api_2
Aug 20, 2020
Merged
Add the ReLU6, Tanhshrink, SELU, Softplus, Softshrink and Softsign for the api 2.0 #26376
hong19860320
merged 13 commits into
PaddlePaddle:develop
from
hong19860320:hongming/fix_api_2
Aug 20, 2020
Conversation
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
test=develop
Thanks for your contribution! |
✅ This PR's description meets the template requirements! |
test=develop
test=develop
test=develop
…r the api 2.0 test=develop
…shrink/softshrink test=develop
… hongming/fix_api_2 test=develop
test=develop
test=develop
… hongming/fix_api_2 test=develop
hong19860320
changed the title
Add the relu6/ReLU6 for the api 2.0
Add the ReLU6, Tanhshrink, SELU, Softplus, Softshrink and Softsign for the api 2.0
Aug 19, 2020
zhupengyang
previously approved these changes
Aug 19, 2020
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.
LGTM
test=develop
test=develop
test=develop
zhupengyang
approved these changes
Aug 19, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR types
Others
PR changes
APIs
Describe
新增/修改如下2.0 API:
ReLU6:
paddle.nn.ReLU6(name=None) - 新增
paddle.nn.functional.relu6(x, name=None) - 新增,去掉threshold参数(fluid.layers.relu6包含threshold参数)
Tanhshrink:
paddle.nn.Tanhshrink(name=None) - 新增
paddle.nn.functional.tanhshrink(x, name=None) - 新增,修改名称(fluid.layers.tanh_shrink)
SELU:
paddle.nn.SELU(scale=1.0507009873554804934193349852946, alpha=1.6732632423543772848170429916717, name=None) - 新增
paddle.nn.functional.selu(x, scale=1.0507009873554804934193349852946, alpha=1.6732632423543772848170429916717, name=None) - 新增,设置参数默认值(fluid.layers.selu(x, scale=None, alpha=None, name=None))
Softplus:
paddle.nn.Softplus(beta=1, threshold=20, name=None) - 新增
paddle.nn.functional.softplus(x, beta=1, threshold=20, name=None) - 新增,增加参数beta和threshold参数,并设置默认值(fluid.layers.softplus(x, name=None))
Softshrink:
paddle.nn.Softshrink(threshold=0.5, name=None) - 新增
paddle.nn.functional.softshrink(x, threshold=0.5, name=None) - 新增,alpha改为threshold并设置默认值(fluid.layers.softshrink(x, alpha=None, name=None))
Softsign:
paddle.nn.Softsign(name=None) - 新增
paddle.nn.functional.softsign(x, name=None) - 新增,(fluid.layers.softsign(x, name=None))