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

prelu api #2405

Closed
lazyjek opened this issue Jun 7, 2017 · 4 comments · Fixed by #2412
Closed

prelu api #2405

lazyjek opened this issue Jun 7, 2017 · 4 comments · Fixed by #2412
Assignees

Comments

@lazyjek
Copy link

lazyjek commented Jun 7, 2017

没有定义prelu的接口,activation func只定义了brelu,softrelu和relu函数,而且好像也没有完整的说明文档。请教一下如果想用prelu的话需要怎么修改接口呢。

@lcy-seso
Copy link
Contributor

lcy-seso commented Jun 7, 2017

你好,PaddlePaddle 目前是实现了prelu 激活函数,https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/trainer/config_parser.py#L1727
但在 config_parser_helpers 中没有添加 python 接口。我来加上。

@lazyjek
Copy link
Author

lazyjek commented Jun 7, 2017

请问加上以后是不是需要更新安装包重新安装?大约什么时候发布呢?

@lcy-seso
Copy link
Contributor

lcy-seso commented Jun 7, 2017

hi @lazyjek I add prelu in this PR #2412.

@lcy-seso
Copy link
Contributor

lcy-seso commented Jun 7, 2017

可以不重新安装,在原来的安装环境中,替换掉修改的这几个python脚本即可。

使用方法如下:

import paddle.v2.data_type as data_type
import paddle.v2 as paddle

data = paddle.layer.data(name='input', type=data_type.dense_vector(64))
y = paddle.layer.prelu(data)

由于 prelu 有需要学习的参数,在PaddlePaddle 是一个 layer。

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 a pull request may close this issue.

2 participants