Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
09b35192
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看板
提交
09b35192
编写于
6月 17, 2019
作者:
Z
zhupengyang
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'zhupy/fix-split-op' into 'incubate/lite'
fix split op See merge request inference/paddlelite!22
上级
f116bb9e
aed3fc8e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
5 deletion
+5
-5
paddle/fluid/lite/operators/CMakeLists.txt
paddle/fluid/lite/operators/CMakeLists.txt
+2
-2
paddle/fluid/lite/operators/split_op.cc
paddle/fluid/lite/operators/split_op.cc
+3
-3
未找到文件。
paddle/fluid/lite/operators/CMakeLists.txt
浏览文件 @
09b35192
...
@@ -20,7 +20,7 @@ cc_library(fill_constant_op_lite SRCS fill_constant_op.cc DEPS ${op_DEPS})
...
@@ -20,7 +20,7 @@ cc_library(fill_constant_op_lite SRCS fill_constant_op.cc DEPS ${op_DEPS})
cc_library
(
op_params_lite SRCS op_params.cc DEPS
${
tensor_lite
}
any_lite framework_proto_lite
)
cc_library
(
op_params_lite SRCS op_params.cc DEPS
${
tensor_lite
}
any_lite framework_proto_lite
)
cc_library
(
dropout_op_lite SRCS dropout_op.cc DEPS
${
op_DEPS
}
)
cc_library
(
dropout_op_lite SRCS dropout_op.cc DEPS
${
op_DEPS
}
)
cc_library
(
concat_op_lite SRCS concat_op.cc DEPS
${
op_DEPS
}
)
cc_library
(
concat_op_lite SRCS concat_op.cc DEPS
${
op_DEPS
}
)
#
cc_library(split_op_lite SRCS split_op.cc DEPS ${op_DEPS})
cc_library
(
split_op_lite SRCS split_op.cc DEPS
${
op_DEPS
}
)
set
(
ops_lite
set
(
ops_lite
conv_op_lite
conv_op_lite
...
@@ -41,7 +41,7 @@ set(ops_lite
...
@@ -41,7 +41,7 @@ set(ops_lite
activation_ops_lite
activation_ops_lite
dropout_op_lite
dropout_op_lite
concat_op_lite
concat_op_lite
#
split_op_lite
split_op_lite
PARENT_SCOPE
)
PARENT_SCOPE
)
lite_cc_test
(
test_fc_op_lite SRCS fc_op_test.cc
lite_cc_test
(
test_fc_op_lite SRCS fc_op_test.cc
...
...
paddle/fluid/lite/operators/split_op.cc
浏览文件 @
09b35192
...
@@ -48,7 +48,7 @@ bool SplitOp::InferShape() const {
...
@@ -48,7 +48,7 @@ bool SplitOp::InferShape() const {
outs_dims
.
push_back
(
dim
);
outs_dims
.
push_back
(
dim
);
}
}
}
else
if
(
sections
.
size
()
>
0
)
{
}
else
if
(
sections
.
size
()
>
0
)
{
for
(
size_
t
i
=
0
;
i
<
outs_number
;
++
i
)
{
for
(
in
t
i
=
0
;
i
<
outs_number
;
++
i
)
{
auto
dim
=
in_dims
;
auto
dim
=
in_dims
;
dim
[
axis
]
=
sections
[
i
];
dim
[
axis
]
=
sections
[
i
];
outs_dims
.
push_back
(
dim
);
outs_dims
.
push_back
(
dim
);
...
@@ -66,9 +66,9 @@ bool SplitOp::AttachImpl(const cpp::OpDesc &opdesc, lite::Scope *scope) {
...
@@ -66,9 +66,9 @@ bool SplitOp::AttachImpl(const cpp::OpDesc &opdesc, lite::Scope *scope) {
param_
.
axis
=
opdesc
.
GetAttr
<
int
>
(
"axis"
);
param_
.
axis
=
opdesc
.
GetAttr
<
int
>
(
"axis"
);
param_
.
num
=
opdesc
.
GetAttr
<
int
>
(
"num"
);
param_
.
num
=
opdesc
.
GetAttr
<
int
>
(
"num"
);
param_
.
sections
=
opdesc
.
GetAttr
<
std
::
vector
<
int
>>
(
"sections"
);
param_
.
sections
=
opdesc
.
GetAttr
<
std
::
vector
<
int
>>
(
"sections"
);
param_
.
x
=
const_cast
<
lite
::
Tensor
*>
(
auto
input
=
opdesc
.
Input
(
"Input"
).
front
();
&
scope
->
FindVar
(
opdesc
.
Input
(
"X"
).
front
())
->
Get
<
lite
::
Tensor
>
());
auto
outs
=
opdesc
.
Output
(
"Out"
);
auto
outs
=
opdesc
.
Output
(
"Out"
);
param_
.
x
=
scope
->
FindVar
(
input
)
->
GetMutable
<
lite
::
Tensor
>
();
for
(
auto
var
:
outs
)
{
for
(
auto
var
:
outs
)
{
param_
.
output
.
push_back
(
scope
->
FindVar
(
var
)
->
GetMutable
<
lite
::
Tensor
>
());
param_
.
output
.
push_back
(
scope
->
FindVar
(
var
)
->
GetMutable
<
lite
::
Tensor
>
());
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录