zhreshold commented on a change in pull request #12131: [MXNET-737][WIP] Add
last batch handle for imageiter
URL: https://github.com/apache/incubator-mxnet/pull/12131#discussion_r209778510
##########
File path: python/mxnet/image/image.py
##########
@@ -1059,16 +1059,21 @@ class ImageIter(io.DataIter):
Label name for provided symbols.
dtype : str
Label data type. Default: float32. Other options: int32, int64, float64
+ last_batch_hanle : str, optional
+ How to handle the last batch. This parameter can be ‘pad’, ‘discard’
or ‘roll_over’.
+ 'discard' is not support when reading from record file(.rec)
withouting shuffle(=False)
Review comment:
I think you can check if valid batch.shape[0] is smaller than batch_size
without checking how many images are there.
----------------------------------------------------------------
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