Check data format consistency in data_feeder (#8417)

emailweixu-patch-1
emailweixu 7 years ago committed by Yi Wang
parent c77715e3af
commit dafc7e3643

@ -107,6 +107,9 @@ class DataFeeder(object):
dtype=dtype))
for each_sample in iterable:
assert len(each_sample) == len(converter), (
"The number of fields in data (%s) does not match " +
"len(feed_list) (%s)") % (len(each_sample), len(converter))
for each_converter, each_slot in six.zip(converter, each_sample):
each_converter.feed(each_slot)
ret_dict = {}

Loading…
Cancel
Save