turtleizzy commented on issue #15535: mxnet.io.NDArrayIter does not properly 
function when len(data) * 2 < batch_size and last_batch_handle='pad'
URL: 
https://github.com/apache/incubator-mxnet/issues/15535#issuecomment-511213685
 
 
   > I was running your code, and it looks like `last_batch_handle` has nothing 
to do with the error. You'll get the same error whenever your `batch size > 2 * 
len(data)`.
   > 
   > ```python
   > data = mx.nd.arange(5)
   > 
   > dtIter = mx.io.NDArrayIter(data, batch_size=11) # everything is fine for 
batch_size upto 10
   > for i in dtIter:
   >     print (i.data)
   > ```
   > 
   > prints:
   > `IndexError: Slicing stop 6 exceeds limit of 5`
   
   `last_batch_handle='pad'` does matter because the default value for 
`last_batch_handle` is `'pad'` and all other options (`roll_over` and 
`discard`) does not result in exception.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to