Skip to content

Commit

Permalink
Fix data provider bug in srl demo
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Peng Li committed Dec 22, 2016
1 parent b53bdcd commit 9baf7fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion demo/semantic_role_labeling/dataprovider.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9baf7fc

Please sign in to comment.