From ff446b76c95e93604236a7de1741178f430a2a91 Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Wed, 8 Jul 2020 17:50:54 +0800 Subject: [PATCH] int to int64 of lod type --- deploy/lite/ocr_db_crnn.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/deploy/lite/ocr_db_crnn.cc b/deploy/lite/ocr_db_crnn.cc index cd1ec4c4..e59cdcd4 100644 --- a/deploy/lite/ocr_db_crnn.cc +++ b/deploy/lite/ocr_db_crnn.cc @@ -142,14 +142,13 @@ void RunRecModel(std::vector>> boxes, cv::Mat img, // Get output and run postprocess std::unique_ptr output_tensor0( std::move(predictor_crnn->GetOutput(0))); - auto *rec_idx = output_tensor0->data(); + auto *rec_idx = output_tensor0->data(); auto rec_idx_lod = output_tensor0->lod(); auto shape_out = output_tensor0->shape(); std::vector pred_idx; - for (int n = int(rec_idx_lod[0][0]); n < int(rec_idx_lod[0][1] * 2); - n += 2) { + for (int n = int(rec_idx_lod[0][0]); n < int(rec_idx_lod[0][1]); n += 1) { pred_idx.push_back(int(rec_idx[n])); } -- GitLab