Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
迷途归一
Paddle
提交
d6622b18
P
Paddle
项目概览
迷途归一
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d6622b18
编写于
3月 07, 2017
作者:
T
Tao Luo
提交者:
GitHub
3月 07, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1565 from luotao1/relu
add relu in layer_math.py
上级
05541295
82437970
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
27 addition
and
9 deletion
+27
-9
python/paddle/trainer_config_helpers/layer_math.py
python/paddle/trainer_config_helpers/layer_math.py
+1
-0
python/paddle/trainer_config_helpers/tests/configs/math_ops.py
...n/paddle/trainer_config_helpers/tests/configs/math_ops.py
+2
-1
python/paddle/trainer_config_helpers/tests/configs/protostr/math_ops.protostr
...r_config_helpers/tests/configs/protostr/math_ops.protostr
+24
-8
未找到文件。
python/paddle/trainer_config_helpers/layer_math.py
浏览文件 @
d6622b18
...
...
@@ -39,6 +39,7 @@ register_unary_math_op('abs', act.AbsActivation())
register_unary_math_op
(
'sigmoid'
,
act
.
SigmoidActivation
())
register_unary_math_op
(
'tanh'
,
act
.
TanhActivation
())
register_unary_math_op
(
'square'
,
act
.
SquareActivation
())
register_unary_math_op
(
'relu'
,
act
.
ReluActivation
())
def
add
(
layeroutput
,
other
):
...
...
python/paddle/trainer_config_helpers/tests/configs/math_ops.py
浏览文件 @
d6622b18
...
...
@@ -7,8 +7,9 @@ x = layer_math.exp(x)
x
=
layer_math
.
log
(
x
)
x
=
layer_math
.
abs
(
x
)
x
=
layer_math
.
sigmoid
(
x
)
x
=
layer_math
.
tanh
(
x
)
x
=
layer_math
.
square
(
x
)
x
=
layer_math
.
square
(
x
)
x
=
layer_math
.
relu
(
x
)
y
=
1
+
x
y
=
y
+
1
y
=
x
+
y
...
...
python/paddle/trainer_config_helpers/tests/configs/protostr/math_ops.protostr
浏览文件 @
d6622b18
...
...
@@ -65,13 +65,28 @@ layers {
}
}
}
layers {
name: "__tanh_0__"
type: "mixed"
size: 100
active_type: "tanh"
inputs {
input_layer_name: "__sigmoid_0__"
proj_conf {
type: "identity"
name: "___tanh_0__.w0"
input_size: 100
output_size: 100
}
}
}
layers {
name: "__square_0__"
type: "mixed"
size: 100
active_type: "square"
inputs {
input_layer_name: "__
sigmoid
_0__"
input_layer_name: "__
tanh
_0__"
proj_conf {
type: "identity"
name: "___square_0__.w0"
...
...
@@ -81,15 +96,15 @@ layers {
}
}
layers {
name: "__
square_1
__"
name: "__
relu_0
__"
type: "mixed"
size: 100
active_type: "
square
"
active_type: "
relu
"
inputs {
input_layer_name: "__square_0__"
proj_conf {
type: "identity"
name: "___
square_1
__.w0"
name: "___
relu_0
__.w0"
input_size: 100
output_size: 100
}
...
...
@@ -101,7 +116,7 @@ layers {
size: 100
active_type: ""
inputs {
input_layer_name: "__
square_1
__"
input_layer_name: "__
relu_0
__"
}
slope: 1.0
intercept: 1
...
...
@@ -123,7 +138,7 @@ layers {
size: 100
active_type: ""
inputs {
input_layer_name: "__
square_1
__"
input_layer_name: "__
relu_0
__"
proj_conf {
type: "identity"
name: "___mixed_0__.w0"
...
...
@@ -147,7 +162,7 @@ layers {
size: 100
active_type: ""
inputs {
input_layer_name: "__
square_1
__"
input_layer_name: "__
relu_0
__"
}
slope: -1.0
intercept: 0.0
...
...
@@ -339,8 +354,9 @@ sub_models {
layer_names: "__log_0__"
layer_names: "__abs_0__"
layer_names: "__sigmoid_0__"
layer_names: "__tanh_0__"
layer_names: "__square_0__"
layer_names: "__
square_1
__"
layer_names: "__
relu_0
__"
layer_names: "__slope_intercept_layer_0__"
layer_names: "__slope_intercept_layer_1__"
layer_names: "__mixed_0__"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录