You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/12/07 01:10:29 UTC
[GitHub] [incubator-mxnet] wkcn commented on a change in pull request
#17001: Fix NDArrayIter cant pad when size is large
wkcn commented on a change in pull request #17001: Fix NDArrayIter cant pad when size is large
URL: https://github.com/apache/incubator-mxnet/pull/17001#discussion_r355087376
##########
File path: python/mxnet/io/io.py
##########
@@ -748,11 +744,12 @@ def _batchify(self, data_source):
self.cursor + self.batch_size > self.num_data:
pad = self.batch_size - self.num_data + self.cursor
first_data = self._getdata(data_source, start=self.cursor)
+ second_data = None
if pad > self.num_data:
while True:
if pad <= self.num_data:
break
- second_data = self._getdata(data_source, end=self.num_data)
+ second_data = self._concat(second_data, self._getdata(data_source, end=self.num_data))
Review comment:
Can it be replaced with nd.repeat, in order to remove Python while-loop?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services