add type conversion for batch_size

fea/anakin-support-x86
chenweihang 7 years ago
parent 6a05ed3366
commit bcc2fbe687

@ -41,6 +41,7 @@ def batch(reader, batch_size, drop_last=False):
yield b
# Batch size check
batch_size = int(batch_size)
if batch_size <= 0:
raise ValueError("batch_size should be a positive integeral value, "
"but got batch_size={}".format(batch_size))

Loading…
Cancel
Save