Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
1f839a66
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1f839a66
编写于
9月 12, 2017
作者:
C
caoying03
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix bug in prelu parsing.
上级
4137cb0b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
46 addition
and
2 deletion
+46
-2
python/paddle/trainer/config_parser.py
python/paddle/trainer/config_parser.py
+1
-0
python/paddle/trainer_config_helpers/tests/configs/protostr/test_prelu_layer.protostr
..._helpers/tests/configs/protostr/test_prelu_layer.protostr
+43
-2
python/paddle/trainer_config_helpers/tests/configs/test_prelu_layer.py
.../trainer_config_helpers/tests/configs/test_prelu_layer.py
+2
-0
未找到文件。
python/paddle/trainer/config_parser.py
浏览文件 @
1f839a66
...
@@ -2034,6 +2034,7 @@ class ParameterReluLayer(LayerBase):
...
@@ -2034,6 +2034,7 @@ class ParameterReluLayer(LayerBase):
config_assert
(
input_layer
.
size
%
partial_sum
==
0
,
config_assert
(
input_layer
.
size
%
partial_sum
==
0
,
"a wrong setting for partial_sum"
)
"a wrong setting for partial_sum"
)
self
.
set_layer_size
(
input_layer
.
size
)
self
.
set_layer_size
(
input_layer
.
size
)
self
.
config
.
partial_sum
=
partial_sum
self
.
create_input_parameter
(
0
,
input_layer
.
size
/
partial_sum
)
self
.
create_input_parameter
(
0
,
input_layer
.
size
/
partial_sum
)
...
...
python/paddle/trainer_config_helpers/tests/configs/protostr/test_prelu_layer.protostr
浏览文件 @
1f839a66
...
@@ -14,6 +14,29 @@ layers {
...
@@ -14,6 +14,29 @@ layers {
input_layer_name: "input"
input_layer_name: "input"
input_parameter_name: "___prelu_layer_0__.w0"
input_parameter_name: "___prelu_layer_0__.w0"
}
}
partial_sum: 1
}
layers {
name: "__prelu_layer_1__"
type: "prelu"
size: 300
active_type: ""
inputs {
input_layer_name: "input"
input_parameter_name: "___prelu_layer_1__.w0"
}
partial_sum: 1
}
layers {
name: "__prelu_layer_2__"
type: "prelu"
size: 300
active_type: ""
inputs {
input_layer_name: "input"
input_parameter_name: "___prelu_layer_2__.w0"
}
partial_sum: 5
}
}
parameters {
parameters {
name: "___prelu_layer_0__.w0"
name: "___prelu_layer_0__.w0"
...
@@ -23,14 +46,32 @@ parameters {
...
@@ -23,14 +46,32 @@ parameters {
initial_strategy: 0
initial_strategy: 0
initial_smart: true
initial_smart: true
}
}
parameters {
name: "___prelu_layer_1__.w0"
size: 300
initial_mean: 0.0
initial_std: 0.057735026919
initial_strategy: 0
initial_smart: true
}
parameters {
name: "___prelu_layer_2__.w0"
size: 60
initial_mean: 0.0
initial_std: 0.129099444874
initial_strategy: 0
initial_smart: true
}
input_layer_names: "input"
input_layer_names: "input"
output_layer_names: "__prelu_layer_
0
__"
output_layer_names: "__prelu_layer_
2
__"
sub_models {
sub_models {
name: "root"
name: "root"
layer_names: "input"
layer_names: "input"
layer_names: "__prelu_layer_0__"
layer_names: "__prelu_layer_0__"
layer_names: "__prelu_layer_1__"
layer_names: "__prelu_layer_2__"
input_layer_names: "input"
input_layer_names: "input"
output_layer_names: "__prelu_layer_
0
__"
output_layer_names: "__prelu_layer_
2
__"
is_recurrent_layer_group: false
is_recurrent_layer_group: false
}
}
python/paddle/trainer_config_helpers/tests/configs/test_prelu_layer.py
浏览文件 @
1f839a66
...
@@ -2,5 +2,7 @@ from paddle.trainer_config_helpers import *
...
@@ -2,5 +2,7 @@ from paddle.trainer_config_helpers import *
data
=
data_layer
(
name
=
'input'
,
size
=
300
)
data
=
data_layer
(
name
=
'input'
,
size
=
300
)
prelu
=
prelu_layer
(
input
=
data
)
prelu
=
prelu_layer
(
input
=
data
)
prelu
=
prelu_layer
(
input
=
data
,
partial_sum
=
1
)
prelu
=
prelu_layer
(
input
=
data
,
partial_sum
=
5
)
outputs
(
prelu
)
outputs
(
prelu
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录