From 9baf7fc479fbf1bf3295e18571098ac31cac5e98 Mon Sep 17 00:00:00 2001 From: Peng Li Date: Thu, 22 Dec 2016 11:02:39 +0800 Subject: [PATCH] Fix data provider bug in srl demo Once encoutering a single sample whose size is larger than batch size, the provider will yield empty batch and terminate the current pass unexpectedly if can_over_batch_size=False. --- demo/semantic_role_labeling/dataprovider.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/semantic_role_labeling/dataprovider.py b/demo/semantic_role_labeling/dataprovider.py index 042cd4e7a9..360c57ea62 100644 --- a/demo/semantic_role_labeling/dataprovider.py +++ b/demo/semantic_role_labeling/dataprovider.py @@ -43,7 +43,7 @@ def get_batch_size(yeild_data): init_hook=hook, should_shuffle=True, calc_batch_size=get_batch_size, - can_over_batch_size=False, + can_over_batch_size=True, cache=CacheType.CACHE_PASS_IN_MEM) def process(settings, file_name): with open(file_name, 'r') as fdata: -- GitLab