未验证 提交 06a0de59 编写于 作者: T tianxin 提交者: GitHub

Merge pull request #98 from PaddlePaddle/fix_data_yield

Fix data yield
......@@ -196,10 +196,11 @@ class DataProcessor(object):
return_num_token=False)
if len(all_dev_batches) < dev_count:
all_dev_batches.append(batch_data)
else:
if len(all_dev_batches) == dev_count:
for batch in all_dev_batches:
yield batch
all_dev_batches = [batch_data]
all_dev_batches = []
return wrapper
......
......@@ -566,10 +566,11 @@ class DataProcessor(object):
return_num_token=False)
if len(all_dev_batches) < dev_count:
all_dev_batches.append(batch_data)
else:
if len(all_dev_batches) == dev_count:
for batch in all_dev_batches:
yield batch
all_dev_batches = [batch_data]
all_dev_batches = []
return wrapper
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册