Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
82437970
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看板
提交
82437970
编写于
3月 06, 2017
作者:
L
Luo Tao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add relu in layer_math.py
上级
ca62c104
变更
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
浏览文件 @
82437970
...
...
@@ -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
浏览文件 @
82437970
...
...
@@ -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
浏览文件 @
82437970
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录