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_r210183119
##########
File path: python/mxnet/image/image.py
##########
@@ -1179,17 +1210,16 @@ def next_sample(self):
else:
s = self.imgrec.read()
if s is None:
+ if self.last_batch != 'discard':
+ self.imgrec.reset()
raise StopIteration
header, img = recordio.unpack(s)
return header.label, img
- def next(self):
- """Returns the next batch of data."""
+ def iterate(self, batch_data, batch_label, start=0):
Review comment:
actually `_batchify` could be better IMO
----------------------------------------------------------------
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