From 5e82956dd31d69947804de122d47028eb7a59766 Mon Sep 17 00:00:00 2001 From: jerrywgz Date: Thu, 31 Jan 2019 15:41:46 +0800 Subject: [PATCH] fix rcnn reader bug (#1719) --- fluid/PaddleCV/rcnn/reader.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fluid/PaddleCV/rcnn/reader.py b/fluid/PaddleCV/rcnn/reader.py index fcd7234e..4a634720 100644 --- a/fluid/PaddleCV/rcnn/reader.py +++ b/fluid/PaddleCV/rcnn/reader.py @@ -148,6 +148,7 @@ def coco(mode, if not padding_total: if len(batch_out) == batch_size: yield padding_minibatch(batch_out) + count += 1 batch_out = [] else: if len(batch_out) == total_batch_size: @@ -158,10 +159,10 @@ def coco(mode, sub_batch_out.append(batch_out[i * batch_size + j]) yield sub_batch_out + count += 1 sub_batch_out = [] batch_out = [] - count += 1 - if count >= cfg.max_iter + 1: + if count >= cfg.max_iter: return elif mode == "test": batch_out = [] -- GitLab