Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
f8fcc594
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
接近 2 年 前同步成功
通知
707
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f8fcc594
编写于
6月 13, 2019
作者:
Z
zhupengyang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix split unit test
上级
924fed01
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
5 addition
and
6 deletion
+5
-6
paddle/fluid/lite/kernels/arm/split_compute_test.cc
paddle/fluid/lite/kernels/arm/split_compute_test.cc
+2
-3
paddle/fluid/lite/operators/split_op.cc
paddle/fluid/lite/operators/split_op.cc
+2
-2
paddle/fluid/lite/operators/split_op.h
paddle/fluid/lite/operators/split_op.h
+1
-1
未找到文件。
paddle/fluid/lite/kernels/arm/split_compute_test.cc
浏览文件 @
f8fcc594
...
...
@@ -27,7 +27,7 @@ void splite_resize_out(const lite::Tensor* din,
const
std
::
vector
<
lite
::
Tensor
*>&
dout
,
int
axis
,
int
num
,
const
std
::
vector
<
int
>&
sections
)
{
auto
in_dims
=
din
->
dims
();
int
outs_number
;
int
outs_number
=
dout
.
size
()
;
std
::
vector
<
lite
::
DDimLite
>
outs_dims
;
outs_dims
.
reserve
(
outs_number
);
...
...
@@ -118,11 +118,11 @@ TEST(split_arm, compute) {
for
(
int
i
=
0
;
i
<
x
.
dims
().
production
();
i
++
)
{
x_data
[
i
]
=
i
;
}
for
(
auto
out
:
output
)
delete
out
;
for
(
auto
out
:
output_ref
)
delete
out
;
output
.
clear
();
output_ref
.
clear
();
int
outs_number
;
if
(
num
>
0
)
{
outs_number
=
num
;
...
...
@@ -133,7 +133,6 @@ TEST(split_arm, compute) {
output
.
push_back
(
new
lite
::
Tensor
);
output_ref
.
push_back
(
new
lite
::
Tensor
);
}
splite_resize_out
(
&
x
,
output
,
axis
,
num
,
sections
);
splite_resize_out
(
&
x
,
output_ref
,
axis
,
num
,
sections
);
param
.
x
=
&
x
;
...
...
paddle/fluid/lite/operators/split_op.cc
浏览文件 @
f8fcc594
...
...
@@ -31,7 +31,7 @@ bool SplitOp::CheckShape() const {
bool
SplitOp
::
InferShape
()
const
{
const
auto
&
outs
=
param_
.
output
;
auto
in_dims
=
param_
.
x
.
dims
();
auto
in_dims
=
param_
.
x
->
dims
();
int
axis
=
param_
.
axis
;
int
num
=
param_
.
num
;
const
auto
&
sections
=
param_
.
sections
;
...
...
@@ -68,7 +68,7 @@ bool SplitOp::AttachImpl(const cpp::OpDesc &opdesc, lite::Scope *scope) {
param_
.
sections
=
opdesc
.
GetAttr
<
std
::
vector
<
int
>>
(
"sections"
);
param_
.
x
=
const_cast
<
lite
::
Tensor
*>
(
&
scope
->
FindVar
(
opdesc
.
Input
(
"X"
).
front
())
->
Get
<
lite
::
Tensor
>
());
auto
outs
=
op
_desc
.
Output
(
"Out"
).
front
;
auto
outs
=
op
desc
.
Output
(
"Out"
)
;
for
(
auto
var
:
outs
)
{
param_
.
output
.
push_back
(
scope
->
FindVar
(
var
)
->
GetMutable
<
lite
::
Tensor
>
());
}
...
...
paddle/fluid/lite/operators/split_op.h
浏览文件 @
f8fcc594
...
...
@@ -23,7 +23,7 @@ namespace paddle {
namespace
lite
{
namespace
operators
{
class
S
oftmax
Op
:
public
OpLite
{
class
S
plit
Op
:
public
OpLite
{
public:
SplitOp
()
{}
explicit
SplitOp
(
const
std
::
string
&
op_type
)
:
OpLite
(
op_type
)
{}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录