stu1130 commented on a change in pull request #12285: [WIP] Change the way 
NDArrayIter handle the last batch
URL: https://github.com/apache/incubator-mxnet/pull/12285#discussion_r212048749
 
 

 ##########
 File path: python/mxnet/io.py
 ##########
 @@ -633,8 +631,11 @@ class NDArrayIter(DataIter):
         Only supported if no h5py.Dataset inputs are used.
     last_batch_handle : str, optional
         How to handle the last batch. This parameter can be 'pad', 'discard' or
-        'roll_over'. 'roll_over' is intended for training and can cause 
problems
-        if used for prediction.
+        'roll_over'.
+        If 'pad', the last batch will be padded with data starting from the 
begining
 
 Review comment:
   Let say data look like this [1,2,3,4,5,6,7,8,9,10] with batch_size 3
   `pad` would be like [1,2,3],...[7,8,9],[10,1,2], while `roll_over` would be 
[1,2,3],...[7,8,9] and second iteration would be [10,1,2], [3,4,5], [6,7,8] 
after calling reset()
   I've updated example starting from line 610

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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