Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
227fdfb6
P
Paddle
项目概览
Crayon鑫
/
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看板
提交
227fdfb6
编写于
8月 28, 2017
作者:
H
hedaoyuan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Refine NeonDepthwiseConvFunction.
上级
f00c4112
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
26 addition
and
44 deletion
+26
-44
paddle/function/neon/NeonDepthwiseConv.cpp
paddle/function/neon/NeonDepthwiseConv.cpp
+26
-44
未找到文件。
paddle/function/neon/NeonDepthwiseConv.cpp
浏览文件 @
227fdfb6
...
@@ -509,10 +509,9 @@ public:
...
@@ -509,10 +509,9 @@ public:
size_t
filterMultiplier
=
outputChannels
/
groups_
;
size_t
filterMultiplier
=
outputChannels
/
groups_
;
CHECK_EQ
(
inputChannels
,
groups_
);
CHECK_EQ
(
inputChannels
,
groups_
);
// only support
// only support
strideH() == strideW() and filterHeight == filterWidth.
CHECK_EQ
(
strideH
(),
strideW
());
CHECK_EQ
(
strideH
(),
strideW
());
CHECK_EQ
(
filterHeight
,
filterWidth
);
CHECK_EQ
(
filterHeight
,
filterWidth
);
CHECK_LT
(
strideH
(),
size_t
(
3
));
float
*
inputData
=
inputs
[
0
].
data
<
float
>
();
float
*
inputData
=
inputs
[
0
].
data
<
float
>
();
float
*
filterData
=
inputs
[
1
].
data
<
float
>
();
float
*
filterData
=
inputs
[
1
].
data
<
float
>
();
...
@@ -538,49 +537,32 @@ public:
...
@@ -538,49 +537,32 @@ public:
inputWidth
+=
2
*
paddingW
();
inputWidth
+=
2
*
paddingW
();
}
}
for
(
size_t
i
=
0
;
i
<
batchSize
;
i
++
)
{
std
::
function
<
void
(
if
(
filterWidth
==
3
&&
strideH
()
==
1
)
{
const
float
*
,
const
float
*
,
int
,
int
,
int
,
int
,
int
,
int
,
float
*
)
>
DepthwiseConvKernel
<
3
,
1
>::
run
(
inputPadding
,
DepthWiseConv
;
filterData
,
inputHeight
,
if
(
filterWidth
==
3
&&
strideW
()
==
1
)
{
inputWidth
,
DepthWiseConv
=
DepthwiseConvKernel
<
3
,
1
>::
run
;
outputChannels
,
}
else
if
(
filterWidth
==
3
&&
strideW
()
==
2
)
{
outputHeight
,
DepthWiseConv
=
DepthwiseConvKernel
<
3
,
2
>::
run
;
outputWidth
,
}
else
if
(
filterWidth
==
4
&&
strideW
()
==
1
)
{
filterMultiplier
,
DepthWiseConv
=
DepthwiseConvKernel
<
4
,
1
>::
run
;
outputData
);
}
else
if
(
filterWidth
==
4
&&
strideW
()
==
2
)
{
}
else
if
(
filterWidth
==
3
&&
strideH
()
==
2
)
{
DepthWiseConv
=
DepthwiseConvKernel
<
4
,
2
>::
run
;
DepthwiseConvKernel
<
3
,
2
>::
run
(
inputPadding
,
}
else
{
filterData
,
LOG
(
FATAL
)
<<
"Not supported"
;
inputHeight
,
}
inputWidth
,
outputChannels
,
outputHeight
,
outputWidth
,
filterMultiplier
,
outputData
);
}
else
if
(
filterWidth
==
4
&&
strideH
()
==
1
)
{
DepthwiseConvKernel
<
4
,
1
>::
run
(
inputPadding
,
filterData
,
inputHeight
,
inputWidth
,
outputChannels
,
outputHeight
,
outputWidth
,
filterMultiplier
,
outputData
);
}
else
if
(
filterWidth
==
4
&&
strideH
()
==
2
)
{
DepthwiseConvKernel
<
4
,
2
>::
run
(
inputPadding
,
filterData
,
inputHeight
,
inputWidth
,
outputChannels
,
outputHeight
,
outputWidth
,
filterMultiplier
,
outputData
);
}
for
(
size_t
i
=
0
;
i
<
batchSize
;
i
++
)
{
DepthWiseConv
(
inputPadding
,
filterData
,
inputHeight
,
inputWidth
,
outputChannels
,
outputHeight
,
outputWidth
,
filterMultiplier
,
outputData
);
inputPadding
+=
inputChannels
*
inputHeight
*
inputWidth
;
inputPadding
+=
inputChannels
*
inputHeight
*
inputWidth
;
outputData
+=
outputChannels
*
outputHeight
*
outputWidth
;
outputData
+=
outputChannels
*
outputHeight
*
outputWidth
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录