Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
ff446b76
"...data/git@developer.sourcefind.cn:dcuai/dlexamples.git" did not exist on "a30b77fe6ad985bce0e362e4715a6a21a7ed488e"
Commit
ff446b76
authored
Jul 08, 2020
by
LDOUBLEV
Browse files
int to int64 of lod type
parent
6420a76b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
deploy/lite/ocr_db_crnn.cc
deploy/lite/ocr_db_crnn.cc
+2
-3
No files found.
deploy/lite/ocr_db_crnn.cc
View file @
ff446b76
...
@@ -142,14 +142,13 @@ void RunRecModel(std::vector<std::vector<std::vector<int>>> boxes, cv::Mat img,
...
@@ -142,14 +142,13 @@ void RunRecModel(std::vector<std::vector<std::vector<int>>> boxes, cv::Mat img,
// Get output and run postprocess
// Get output and run postprocess
std
::
unique_ptr
<
const
Tensor
>
output_tensor0
(
std
::
unique_ptr
<
const
Tensor
>
output_tensor0
(
std
::
move
(
predictor_crnn
->
GetOutput
(
0
)));
std
::
move
(
predictor_crnn
->
GetOutput
(
0
)));
auto
*
rec_idx
=
output_tensor0
->
data
<
int
>
();
auto
*
rec_idx
=
output_tensor0
->
data
<
int
64
>
();
auto
rec_idx_lod
=
output_tensor0
->
lod
();
auto
rec_idx_lod
=
output_tensor0
->
lod
();
auto
shape_out
=
output_tensor0
->
shape
();
auto
shape_out
=
output_tensor0
->
shape
();
std
::
vector
<
int
>
pred_idx
;
std
::
vector
<
int
>
pred_idx
;
for
(
int
n
=
int
(
rec_idx_lod
[
0
][
0
]);
n
<
int
(
rec_idx_lod
[
0
][
1
]
*
2
);
for
(
int
n
=
int
(
rec_idx_lod
[
0
][
0
]);
n
<
int
(
rec_idx_lod
[
0
][
1
]);
n
+=
1
)
{
n
+=
2
)
{
pred_idx
.
push_back
(
int
(
rec_idx
[
n
]));
pred_idx
.
push_back
(
int
(
rec_idx
[
n
]));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment