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 02:20:10 UTC

[GitHub] [incubator-mxnet] stu1130 commented on a change in pull request #17001: Fix NDArrayIter cant pad when size is large

stu1130 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_r355092816
 
 

 ##########
 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:
   Good idea

----------------------------------------------------------------
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