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

elu gelu relu logsigmoid, test=develop #26304

Merged
merged 9 commits into from
Aug 19, 2020

Conversation

qili93
Copy link
Contributor

@qili93 qili93 commented Aug 15, 2020

PR types

Others

PR changes

APIs

Describe

新增/修改如下2.0 API:

ELU:

  • paddle.nn.ELU(alpha=1.0, name=None) - 新增此class
  • paddle.nn.functional.elu(x, alpha=1.0, name=None) - 新增此function

GELU

  • paddle.nn.GELU(alpha=1.0, name=None) - 新增此class
  • paddle.nn.functional.gelu(x, approximate=False, name=None) - 新增此function,参数approximate保留

ReLU

  • paddle.nn.ReLU(name=None) - 保持,删除alias, 删除inplace, input改为x,
  • paddle.nn.functional.relu(x, alpha=1.0, name=None) - 删除inplace,input改为x,完善文档改用动态图demo

LogSigmoid

  • paddle.nn.LogSigmoid(name=None) - 新增此class
  • paddle.nn.functional.logsigmoid(x, name=None) - 新增此function

function_elu
function_gelu
function_logsigmoid
function_prelu

@paddle-bot-old
Copy link

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

@qili93 qili93 changed the title logsigmoid and LogSigmoid, test=develop elu gelu relu logsigmoid, test=develop Aug 17, 2020
python/paddle/nn/functional/activation.py Outdated Show resolved Hide resolved
res = functional.relu(data) # [0, 0, 1]
paddle.disable_static()

x = paddle.to_variable(p.array([-2, 0, 1]).astype('float32'))
Copy link
Contributor

Choose a reason for hiding this comment

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

np.array

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

python/paddle/nn/functional/activation.py Outdated Show resolved Hide resolved
python/paddle/nn/functional/activation.py Outdated Show resolved Hide resolved
zhupengyang
zhupengyang previously approved these changes Aug 17, 2020
Copy link
Contributor

@zhupengyang zhupengyang 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 61800f4 into PaddlePaddle:develop Aug 19, 2020
@qili93 qili93 deleted the new_20_api branch August 19, 2020 02:57
@qili93
Copy link
Contributor Author

qili93 commented Aug 21, 2020

Fluid Doc PR PaddlePaddle/docs#2407

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