Skip to content

Commit bcc2fbe

Browse files
committed
add type conversion for batch_size
1 parent 6a05ed3 commit bcc2fbe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

python/paddle/batch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def batch_reader():
4141
yield b
4242

4343
# Batch size check
44+
batch_size = int(batch_size)
4445
if batch_size <= 0:
4546
raise ValueError("batch_size should be a positive integeral value, "
4647
"but got batch_size={}".format(batch_size))

0 commit comments

Comments
 (0)