Skip to content

Commit

Permalink
Change the way NDArrayIter handle the last batch (apache#12285)
Browse files Browse the repository at this point in the history
* 1. move the shuffle to the reset 2. modify the roll_over behavior accordingly

* refactor the concat part

* refactor the code

* implement unit test for last_batch_handle

* refactor the getdata part

* add docstring and refine the code according to linter

* 1. add test case for NDArrayIter_h5py 2. refactor the implementation

* update contributions doc

* fix wording

* update doc for roll_over

* 1. add test for second iteration of roll_over 2. add shuffle test case

* fix some wording and refine the variables naming

* move utility function to new file

* move utility function to io_utils.py

* change shuffle function name to avoid redefining name

* make io as a module

* rename the utility functions

* disable wildcard-import
  • Loading branch information
stu1130 authored and anirudh2290 committed Sep 19, 2018
1 parent 4363d35 commit 61c5a5c
Show file tree
Hide file tree
Showing 5 changed files with 328 additions and 190 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,4 @@ List of Contributors
* [Aaron Markham](https://github.com/aaronmarkham)
* [Sam Skalicky](https://github.com/samskalicky)
* [Per Goncalves da Silva](https://github.com/perdasilva)
* [Cheng-Che Lee](https://github.com/stu1130)
29 changes: 29 additions & 0 deletions python/mxnet/io/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env python

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# coding: utf-8
# pylint: disable=wildcard-import
""" Data iterators for common data formats and utility functions."""
from __future__ import absolute_import

from . import io
from .io import *

from . import utils
from .utils import *
Loading

0 comments on commit 61c5a5c

Please sign in to comment.