Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
d2b70c3c
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
331
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
271
列表
看板
标记
里程碑
合并请求
78
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle-Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
271
Issue
271
列表
看板
标记
里程碑
合并请求
78
合并请求
78
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
d2b70c3c
编写于
8月 18, 2020
作者:
S
Santa An
提交者:
GitHub
8月 18, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[LITE][BM] Fix priorbox issue,test=develop (#4087)
上级
73ce5e62
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
11 deletion
+10
-11
lite/kernels/bm/bridges/density_prior_box_op.cc
lite/kernels/bm/bridges/density_prior_box_op.cc
+4
-4
lite/kernels/bm/bridges/prior_box_op.cc
lite/kernels/bm/bridges/prior_box_op.cc
+5
-4
lite/kernels/bm/bridges/slice_op.cc
lite/kernels/bm/bridges/slice_op.cc
+1
-3
未找到文件。
lite/kernels/bm/bridges/density_prior_box_op.cc
浏览文件 @
d2b70c3c
...
@@ -218,10 +218,10 @@ int DensityPriorBoxConverter(void* ctx, OpLite* op, KernelBase* kernel) {
...
@@ -218,10 +218,10 @@ int DensityPriorBoxConverter(void* ctx, OpLite* op, KernelBase* kernel) {
i_split_shape_data
[
1
]
/=
2
;
i_split_shape_data
[
1
]
/=
2
;
shape
[
0
]
=
&
i_split_shape_data
[
0
];
shape
[
0
]
=
&
i_split_shape_data
[
0
];
shape
[
1
]
=
&
i_split_shape_data
[
0
];
shape
[
1
]
=
&
i_split_shape_data
[
0
];
name
[
0
]
=
static_cast
<
const
char
*>
(
auto
boxes_name
=
lite
::
subgraph
::
bm
::
UniqueName
(
"bm_boxes"
);
lite
::
subgraph
::
bm
::
UniqueName
(
"bm_boxes"
).
c_str
()
);
auto
var_name
=
lite
::
subgraph
::
bm
::
UniqueName
(
"bm_var"
);
name
[
1
]
=
static_cast
<
const
char
*>
(
name
[
0
]
=
static_cast
<
const
char
*>
(
boxes_name
.
c_str
());
lite
::
subgraph
::
bm
::
UniqueName
(
"bm_boxes_var"
)
.
c_str
());
name
[
1
]
=
static_cast
<
const
char
*>
(
var_name
.
c_str
());
int
split_size
[
2
];
int
split_size
[
2
];
split_size
[
0
]
=
shape
[
0
][
1
];
split_size
[
0
]
=
shape
[
0
][
1
];
split_size
[
1
]
=
shape
[
1
][
1
];
split_size
[
1
]
=
shape
[
1
][
1
];
...
...
lite/kernels/bm/bridges/prior_box_op.cc
浏览文件 @
d2b70c3c
...
@@ -242,6 +242,7 @@ int PriorBoxConverter(void* ctx, OpLite* op, KernelBase* kernel) {
...
@@ -242,6 +242,7 @@ int PriorBoxConverter(void* ctx, OpLite* op, KernelBase* kernel) {
if
(
op_info
->
HasAttr
(
"prior_num"
))
{
if
(
op_info
->
HasAttr
(
"prior_num"
))
{
param
.
prior_num
=
op_info
->
GetAttr
<
int32_t
>
(
"prior_num"
);
param
.
prior_num
=
op_info
->
GetAttr
<
int32_t
>
(
"prior_num"
);
}
}
param
.
min_max_aspect_ratios_order
=
false
;
if
(
op_info
->
HasAttr
(
"min_max_aspect_ratios_order"
))
{
if
(
op_info
->
HasAttr
(
"min_max_aspect_ratios_order"
))
{
param
.
min_max_aspect_ratios_order
=
param
.
min_max_aspect_ratios_order
=
op_info
->
GetAttr
<
bool
>
(
"min_max_aspect_ratios_order"
);
op_info
->
GetAttr
<
bool
>
(
"min_max_aspect_ratios_order"
);
...
@@ -289,10 +290,10 @@ int PriorBoxConverter(void* ctx, OpLite* op, KernelBase* kernel) {
...
@@ -289,10 +290,10 @@ int PriorBoxConverter(void* ctx, OpLite* op, KernelBase* kernel) {
i_split_shape_data
[
1
]
/=
2
;
i_split_shape_data
[
1
]
/=
2
;
shape
[
0
]
=
&
i_split_shape_data
[
0
];
shape
[
0
]
=
&
i_split_shape_data
[
0
];
shape
[
1
]
=
&
i_split_shape_data
[
0
];
shape
[
1
]
=
&
i_split_shape_data
[
0
];
name
[
0
]
=
static_cast
<
const
char
*>
(
auto
boxes_name
=
lite
::
subgraph
::
bm
::
UniqueName
(
"bm_boxes"
);
lite
::
subgraph
::
bm
::
UniqueName
(
"bm_boxes"
).
c_str
()
);
auto
var_name
=
lite
::
subgraph
::
bm
::
UniqueName
(
"bm_var"
);
name
[
1
]
=
static_cast
<
const
char
*>
(
name
[
0
]
=
static_cast
<
const
char
*>
(
boxes_name
.
c_str
());
lite
::
subgraph
::
bm
::
UniqueName
(
"bm_boxes_var"
)
.
c_str
());
name
[
1
]
=
static_cast
<
const
char
*>
(
var_name
.
c_str
());
int
split_size
[
2
];
int
split_size
[
2
];
split_size
[
0
]
=
shape
[
0
][
1
];
split_size
[
0
]
=
shape
[
0
][
1
];
split_size
[
1
]
=
shape
[
1
][
1
];
split_size
[
1
]
=
shape
[
1
][
1
];
...
...
lite/kernels/bm/bridges/slice_op.cc
浏览文件 @
d2b70c3c
...
@@ -58,9 +58,7 @@ int SliceConverter(void* ctx, OpLite* op, KernelBase* kernel) {
...
@@ -58,9 +58,7 @@ int SliceConverter(void* ctx, OpLite* op, KernelBase* kernel) {
}
}
for
(
size_t
i
=
0
;
i
<
axes
.
size
();
i
++
)
{
for
(
size_t
i
=
0
;
i
<
axes
.
size
();
i
++
)
{
begin_index
[
axes
[
i
]]
=
starts
[
i
];
begin_index
[
axes
[
i
]]
=
starts
[
i
];
end_index
[
axes
[
i
]]
=
ends
[
i
]
>
static_cast
<
int32_t
>
(
input_dims
.
size
())
end_index
[
axes
[
i
]]
=
ends
[
i
];
?
static_cast
<
int32_t
>
(
input_dims
.
size
())
:
ends
[
i
];
begin_mask
&=
~
(
1
<<
axes
[
i
]);
begin_mask
&=
~
(
1
<<
axes
[
i
]);
end_mask
&=
~
(
1
<<
axes
[
i
]);
end_mask
&=
~
(
1
<<
axes
[
i
]);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录