Skip to content

Commit

Permalink
fix typo and warning
Browse files Browse the repository at this point in the history
  • Loading branch information
tornadomeet committed May 18, 2016
1 parent 442d791 commit b54504b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/system/note_data_loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Here's an example of Image binary recordIO:
![baserecordio](https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/io/ImageRecordIO.jpg)
We first resize the image into 256 * 256, then compact it into JPEG format, after that we save the header which indicates the index and label for that image to construct the Data field of a record. Then pack several images together into a file.

### Accuess Arbitrary Parts Of Data
### Access Arbitrary Parts Of Data

The desired behavior of data loading could be: the packed data can be logically sliced into arbitrary numbers of partitions, no matter how many physical packed data files there are.

Expand Down
6 changes: 3 additions & 3 deletions example/image-classification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ width=400/>

## How to use

First build mxnet by following the [guide](http://mxnet.readthedocs.org/en/latest/build.html)
First build mxnet by following the [guide](http://mxnet.readthedocs.io/en/latest/how_to/build.html)

### Train

Expand Down Expand Up @@ -109,9 +109,9 @@ There are two commonly used way to feed data into MXNet.

The first is packing all example into one or several compact `recordio`
files. See a step-by-step
[tutorial](https://mxnet.readthedocs.org/en/latest/python/io.html#create-dataset-using-recordio)
[tutorial](http://mxnet.readthedocs.io/en/latest/packages/python/io.html#create-dataset-using-recordio)
and the
[document](http://mxnet.readthedocs.org/en/latest/developer-guide/note_data_loading.html)
[document](http://mxnet.readthedocs.io/en/latest/system/note_data_loading.html)
describing how it works.

*Note: A commonly mistake is forgetting shuffle the image list during packing. This will lead fail of training, eg. ```accuracy``` keeps 0.001 for several rounds.*
Expand Down
2 changes: 1 addition & 1 deletion src/engine/threaded_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ class ThreadedEngine : public Engine {
LOG(FATAL) << e.what() << "\n" <<
"An fatal error occurred in asynchronous engine operation. "
"If you do not know what caused this error, "
"you can try set environment variable MXNET_ENGINE_TYPE"
"you can try set environment variable MXNET_ENGINE_TYPE "
"to NaiveEngine and run with debugger (i.e. gdb). "
"This will force all operations to be synchronous and "
"backtrace will give you the series of calls that lead "
Expand Down
2 changes: 1 addition & 1 deletion src/operator/softmax_output-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class SoftmaxOutputProp : public OperatorProperty {
Shape2(dshape[0], dshape.Size()/dshape[0]/dshape[1]));
} else {
TShape label_shape(dshape.ndim() - 1);
for (int i = 0; i + 1 < dshape.ndim(); ++i)
for (index_t i = 0; i + 1 < dshape.ndim(); ++i)
label_shape[i] = dshape[i];
SHAPE_ASSIGN_CHECK(*in_shape, softmaxout_enum::kLabel, label_shape);
}
Expand Down
4 changes: 2 additions & 2 deletions tools/make_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def list_image(root, recursive, exts):
def write_list(path_out, image_list):
with open(path_out, 'w') as fout:
for i in xrange(len(image_list)):
fout.write('%d \t %d \t %s\n'%(i, image_list[i][1], image_list[i][0]))
fout.write('%d\t%d\t%s\n'%(i, image_list[i][1], image_list[i][0]))


def make_list(prefix_out, root, recursive, exts, num_chunks, train_ratio):
Expand Down Expand Up @@ -55,7 +55,7 @@ def main():
required by im2rec')
parser.add_argument('root', help='path to folder that contain images.')
parser.add_argument('prefix', help='prefix of output list files.')
parser.add_argument('--exts', type=list, default=['.jpeg','.jpg'],
parser.add_argument('--exts', type=str, nargs='+', default=['.jpeg','.jpg'],
help='list of acceptable image extensions.')
parser.add_argument('--chunks', type=int, default=1, help='number of chunks.')
parser.add_argument('--train_ratio', type=float, default=1.0,
Expand Down

0 comments on commit b54504b

Please sign in to comment.