未验证 提交 5e82956d 编写于 作者: J jerrywgz 提交者: GitHub

fix rcnn reader bug (#1719)

上级 4191136f
...@@ -148,6 +148,7 @@ def coco(mode, ...@@ -148,6 +148,7 @@ def coco(mode,
if not padding_total: if not padding_total:
if len(batch_out) == batch_size: if len(batch_out) == batch_size:
yield padding_minibatch(batch_out) yield padding_minibatch(batch_out)
count += 1
batch_out = [] batch_out = []
else: else:
if len(batch_out) == total_batch_size: if len(batch_out) == total_batch_size:
...@@ -158,10 +159,10 @@ def coco(mode, ...@@ -158,10 +159,10 @@ def coco(mode,
sub_batch_out.append(batch_out[i * batch_size + sub_batch_out.append(batch_out[i * batch_size +
j]) j])
yield sub_batch_out yield sub_batch_out
count += 1
sub_batch_out = [] sub_batch_out = []
batch_out = [] batch_out = []
count += 1 if count >= cfg.max_iter:
if count >= cfg.max_iter + 1:
return return
elif mode == "test": elif mode == "test":
batch_out = [] batch_out = []
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册