diff --git a/python/paddle/batch.py b/python/paddle/batch.py index 2ba45c8164602e3d090d158741cf4e94f8af6b9f..008509660739d61245526278735064472b8b06dd 100644 --- a/python/paddle/batch.py +++ b/python/paddle/batch.py @@ -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))