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 2018/09/04 17:20:57 UTC

[GitHub] stu1130 commented on a change in pull request #12285: Change the way NDArrayIter handle the last batch

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

 ##########
 File path: python/mxnet/io.py
 ##########
 @@ -17,30 +17,26 @@
 
 """Data iterators for common data formats."""
 from __future__ import absolute_import
-from collections import OrderedDict, namedtuple
+from collections import namedtuple
 
 import sys
 import ctypes
 import logging
 import threading
-try:
-    import h5py
-except ImportError:
-    h5py = None
 import numpy as np
+
 from .base import _LIB
 from .base import c_str_array, mx_uint, py_str
 from .base import DataIterHandle, NDArrayHandle
 from .base import mx_real_t
 from .base import check_call, build_param_doc as _build_param_doc
 from .ndarray import NDArray
 from .ndarray.sparse import CSRNDArray
-from .ndarray.sparse import array as sparse_array
 from .ndarray import _ndarray_cls
 from .ndarray import array
-from .ndarray import concatenate
-from .ndarray import arange
-from .ndarray.random import shuffle as random_shuffle
+from .ndarray import concat
+
+from .io_utils import init_data, has_instance, getdata_by_idx
 
 Review comment:
   The reason I created another file is that the io.py file exceeds 1000 lines.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services