Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
X2Paddle
提交
b541e4a5
X
X2Paddle
项目概览
PaddlePaddle
/
X2Paddle
1 年多 前同步成功
通知
328
Star
698
Fork
167
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
26
列表
看板
标记
里程碑
合并请求
4
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
X2Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
26
Issue
26
列表
看板
标记
里程碑
合并请求
4
合并请求
4
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b541e4a5
编写于
1月 20, 2021
作者:
S
SunAhong1993
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix
上级
b7baa928
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
4 addition
and
4 deletion
+4
-4
x2paddle/optimizer/fusion/dygraph/prelu_fuser.py
x2paddle/optimizer/fusion/dygraph/prelu_fuser.py
+2
-2
x2paddle/optimizer/fusion/static/prelu_fuser.py
x2paddle/optimizer/fusion/static/prelu_fuser.py
+2
-2
未找到文件。
x2paddle/optimizer/fusion/dygraph/prelu_fuser.py
浏览文件 @
b541e4a5
...
...
@@ -32,7 +32,7 @@ class DygraphPReLUFuser(FuseBase):
conv2_mul_1_y = paddle.full(dtype='float32', shape=[1], fill_value=0.5)
conv2_Relu = self.relu1(conv2_Conv2D)
conv2_Abs = paddle.abs(x=conv2_Conv2D)
conv2_sub =
fluid.layers.elementwise_sub
(x=conv2_Conv2D, y=conv2_Abs)
conv2_sub =
paddle.subtract
(x=conv2_Conv2D, y=conv2_Abs)
conv2_mul = paddle.multiply(x=conv2_alphas, y=conv2_sub, axis=1)
conv2_mul_1 = paddle.multiply(x=conv2_mul, y=conv2_mul_1_y, axis=1)
conv2_add = paddle.add(x=conv2_Relu, y=conv2_mul_1)
...
...
@@ -60,7 +60,7 @@ class DygraphPReLUFuser(FuseBase):
inputs
=
{
"x"
:
"prelu-input-0"
},
outputs
=
[
gen_name
(
3
)])
self
.
pattern
.
add_layer
(
"
fluid.layers.elementwise_sub
"
,
"
paddle.subtract
"
,
inputs
=
{
"x"
:
"prelu-input-0"
,
"y"
:
gen_name
(
3
)},
outputs
=
[
gen_name
(
4
)])
...
...
x2paddle/optimizer/fusion/static/prelu_fuser.py
浏览文件 @
b541e4a5
...
...
@@ -31,7 +31,7 @@ class StaticPReLUFuser(FuseBase):
conv4_mul_1_y = paddle.full(dtype='float32', shape=[1], fill_value=0.5)
conv4_Relu = paddle.nn.functional.relu(x=conv4_BiasAdd)
conv4_Abs = paddle.abs(x=conv4_BiasAdd)
conv4_sub =
fluid.layers.elementwise_sub
(x=conv4_BiasAdd, y=conv4_Abs)
conv4_sub =
paddle.subtract
(x=conv4_BiasAdd, y=conv4_Abs)
conv4_mul = paddle.multiply(x=conv4_alphas, y=conv4_sub)
conv4_mul_1 = paddle.multiply(x=conv4_mul, y=conv4_mul_1_y)
conv4_add = paddle.add(x=conv4_Relu, y=conv4_mul_1)
...
...
@@ -59,7 +59,7 @@ class StaticPReLUFuser(FuseBase):
inputs
=
{
"x"
:
"prelu-input-0"
},
outputs
=
[
gen_name
(
3
)])
self
.
pattern
.
add_layer
(
"
fluid.layers.elementwise_sub
"
,
"
paddle.subtract
"
,
inputs
=
{
"x"
:
"prelu-input-0"
,
"y"
:
gen_name
(
3
)},
outputs
=
[
gen_name
(
4
)])
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录