diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 0c0384e3c4c9..de3c373c5183 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -96,3 +96,4 @@ List of Contributors * [Ruixiang Zhang](https://github.com/sodabeta7) * [Lodewic van Twillert](https://github.com/Lodewic) * [Aditya Kumar](https://github.com/hiraditya) +* [Dan Becker](https://github.com/dansbecker) diff --git a/README.md b/README.md index 2d8d2c1369f7..49cf5664885e 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,10 @@ MXNet is a deep learning framework designed for both *efficiency* and *flexibility*. It allows you to ***mix*** the [flavours](http://mxnet.readthedocs.org/en/latest/program_model.html) of symbolic -programming and imperative programming together to ***maximize*** the efficiency and your productivity. +programming and imperative programming to ***maximize*** efficiency and productivity. In its core, a dynamic dependency scheduler that automatically parallelizes both symbolic and imperative operations on the fly. -A graph optimization layer is build on top, which makes symbolic execution fast and memory efficient. -The library is portable and lightweight, and is ready scales to multiple GPUs, and multiple machines. +A graph optimization layer on top of that makes symbolic execution fast and memory efficient. +The library is portable and lightweight, and it scales to multiple GPUs and multiple machines. MXNet is also more than a deep learning project. It is also a collection of [blue prints and guidelines](http://mxnet.readthedocs.org/en/latest/#open-source-design-notes) for building @@ -33,7 +33,7 @@ What's New Contents -------- * [Documentation and Tutorials](http://mxnet.readthedocs.org/en/latest/) -* [Open Source Design Notes](http://mxnet.readthedocs.org/en/latest/#open-source-design-notes) +* [Design Notes](http://mxnet.readthedocs.org/en/latest/#open-source-design-notes) * [Code Examples](example) * [Installation](http://mxnet.readthedocs.org/en/latest/build.html) * [Pretrained Models](https://github.com/dmlc/mxnet-model-gallery) @@ -42,13 +42,13 @@ Contents Features -------- -* Open sourced design note on useful insights that can re-used by general DL projects. -* Flexible configuration, for arbitrary computation graph. -* Mix and Maximize good flavours of programming to maximize flexibility and efficiency. -* Lightweight, memory efficient and portable to smart devices. -* Scales up to multi GPUs and distributed setting with auto parallelism. -* Support python, R, C++, Julia, -* Cloud friendly, and directly compatible with S3, HDFS, AZure +* Design notes providing useful insights that can re-used by other DL projects +* Flexible configuration for arbitrary computation graph +* Mix and match good flavours of programming to maximize flexibility and efficiency +* Lightweight, memory efficient and portable to smart devices +* Scales up to multi GPUs and distributed setting with auto parallelism +* Support for python, R, C++ and Julia +* Cloud-friendly and directly compatible with S3, HDFS, and Azure Bug Reporting ------------- @@ -68,4 +68,4 @@ In Neural Information Processing Systems, Workshop on Machine Learning Systems, History ------- -MXNet is initiated and designed in collaboration by authors from [cxxnet](https://github.com/dmlc/cxxnet), [minerva](https://github.com/dmlc/minerva) and [purine2](https://github.com/purine/purine2). The project reflects what we have learnt from the past projects. It combines important flavour of the existing projects, being efficient, flexible and memory efficient. +MXNet is initiated and designed in collaboration by the authors of [cxxnet](https://github.com/dmlc/cxxnet), [minerva](https://github.com/dmlc/minerva) and [purine2](https://github.com/purine/purine2). The project reflects what we have learnt from the past projects. It combines important flavours of the existing projects for efficiency, flexibility and memory efficiency. diff --git a/doc/aws.md b/doc/aws.md index 67edf9e2667b..4bc102d780c6 100644 --- a/doc/aws.md +++ b/doc/aws.md @@ -1,4 +1,4 @@ -# Setup an AWS GPU Cluster from Stratch +# Setup an AWS GPU Cluster from Scratch In this document we give a step-by-step tutorial on how to set up Amazon AWS for MXNet. In particular, we will address: @@ -10,13 +10,12 @@ MXNet. In particular, we will address: ## Use Amazon S3 to host data -Amazon S3 is distributed data storage, which is quite convenient for hosting large -scale datasets. In order to use S3, we need first to get the -[AWS credentials](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSGettingStartedGuide/AWSCredentials.html)), +Amazon S3 is distributed data storage, which is quite convenient for hosting large datasets. To use S3, we first get the +[AWS credentials](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSGettingStartedGuide/AWSCredentials.html), which includes an `ACCESS_KEY_ID` and a `SECRET_ACCESS_KEY`. -In order for MXNet to use S3, we only need to set the environment variables `AWS_ACCESS_KEY_ID` and -`AWS_SECRET_ACCESS_KEY` properly. For example, we can add the following two lines in +To use MXNet with S3, we must set the environment variables `AWS_ACCESS_KEY_ID` and +`AWS_SECRET_ACCESS_KEY` properly. This can be done by adding the following two lines in `~/.bashrc` (replacing the strings with the correct ones) ```bash @@ -32,7 +31,7 @@ wget http://webdocs.cs.ualberta.ca/~bx3/data/mnist.zip unzip mnist.zip && s3cmd put t*-ubyte s3://dmlc/mnist/ ``` -## Setup an EC2 GPU Instance +## Set Up an EC2 GPU Instance MXNet requires the following libraries @@ -42,7 +41,7 @@ MXNet requires the following libraries - `opencv` for image augmentations - `curl` and `openssl` for read/write Amazon S3 -Installing `CUDA` on EC2 instances needs a little bit of effort. Caffe has a nice +Installing `CUDA` on EC2 instances requires some effort. Caffe has a nice [tutorial](https://github.com/BVLC/caffe/wiki/Install-Caffe-on-EC2-from-scratch-(Ubuntu,-CUDA-7,-cuDNN)) on how to install CUDA 7.0 on Ubuntu 14.04 (Note: we tried CUDA 7.5 on Nov 7 2015, but it is problematic.) @@ -74,14 +73,13 @@ echo "USE_S3=1" >>config.mk make -j8 ``` -In order to test whether everything has installed properly, we train a convolution neural network on MNIST using GPU: +To test whether everything is installed properly, we train a Convolutional neural network on MNIST using a GPU: ```bash python tests/python/gpu/test_conv.py ``` -If the MNISt data is placed on `s3://dmlc/mnist`, we can let the program read -the S3 data directly: +If the MNISt data is placed on `s3://dmlc/mnist`, we can read the S3 data directly with the following command ```bash sed -i.bak "s!data_dir = 'data'!data_dir = 's3://dmlc/mnist'!" tests/python/gpu/test_conv.py @@ -89,21 +87,20 @@ sed -i.bak "s!data_dir = 'data'!data_dir = 's3://dmlc/mnist'!" tests/python/gpu/ Note: We can use `sudo ln /dev/null /dev/raw1394` to fix the opencv error `libdc1394 error: Failed to initialize libdc1394`. -## Setup an EC2 GPU Cluster +## Set Up an EC2 GPU Cluster A cluster consists of multiple machines. We can use the machine with MXNet installed as the root machine for submitting jobs, and then launch several slaves machine to run the jobs. For example, launch multiple instances using a AMI, e.g. [ami-12fd8178](https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#LaunchInstanceWizard:ami=ami-12fd8178), -with dependencies installed. There are two suggestions: +with dependencies installed. There are two options: -1. Make all slaves' ports are accessible (same for the root) by setting **type: All TCP**, +1. Make all slaves' ports accessible (same for the root) by setting **type: All TCP**, **Source: Anywhere** in **Configure Security Group** -2. Use the same `pem` as the root machine to access all slaves machine, and - then copy the `pem` file into root machine's `~/.ssh/id_rsa`, it all slaves - machines are ssh-able from the root. +2. Use the same `pem` as the root machine to access all slave machines, and + then copy the `pem` file into root machine's `~/.ssh/id_rsa`. If you do this, all slave machines are ssh-able from the root. Now we run the previous CNN on multiple machines. Assume we are on a working directory of the root machine, such as `~/train`, and MXNet is built as `~/mxnet`. @@ -147,7 +144,7 @@ benchmark for the distributed training. We may consider other [examples](https:/ ## More NOTE ### Use multiple data shards -Usually it is common to pack dataset into multiple files, especially when we pack it distributedly. MXNet support direct loading from multiple data shards, simply put all the record files into a folder, and point the data path to the folder +It is common to pack a dataset into multiple files, especially when working in a distributed environment. MXNet supports direct loading from multiple data shards. Simply put all the record files into a folder, and point the data path to the folder. ### Use YARN, MPI, SGE While ssh can be simple for cases when we do not have a cluster scheduling framework. MXNet is designed to be able to port to various platforms. We also provide other scripts in [tracker](https://github.com/dmlc/dmlc-core/tree/master/tracker) to run on other cluster frameworks, including Hadoop(YARN) and SGE. Your contribution is more than welcomed to provide examples to run mxnet on your favorite distributed platform. diff --git a/doc/index.md b/doc/index.md index 866e30e6febf..761195ee4df8 100644 --- a/doc/index.md +++ b/doc/index.md @@ -1,7 +1,7 @@ MXNet Documentation =================== [MXNet](https://github.com/dmlc/mxnet) is a deep learning framework designed for both *efficiency* and *flexibility*. -It allows you to mix the flavours of deep learning programs together to maximize the efficiency and your productivity. +It allows you to mix the flavours of deep learning programs together to maximize efficiency and your productivity. User Guide ---------- @@ -24,8 +24,8 @@ Developer Guide Open Source Design Notes ------------------------ -This section contains the design document and notes we made for mxnet system design and deep learning -libraries in general. We believe that open sourcing the system design note can letgeneral audiences understand the motivations and the benefits drawbacks of design choices, and help those who uses deep learning and who builds deep learning systems. +This design document contains notes that are relevant to the MXNet system design and deep learning +libraries in general. We believe that open sourcing this system design note can help general audiences understand the motivations, benefits and drawbacks of our design choices. This will help deep learning practitioners as well as builders of other deep learning systems. This section will be updated with self-contained design notes on various aspect of deep learning systems, in terms of abstraction, optimization and trade-offs. diff --git a/python/mxnet/initializer.py b/python/mxnet/initializer.py index b354c313b1d4..a84c694a159d 100644 --- a/python/mxnet/initializer.py +++ b/python/mxnet/initializer.py @@ -131,7 +131,7 @@ class Mixed(object): """ def __init__(self, patterns, initializers): assert len(patterns) == len(initializers) - self.map = zip([re.compile(p) for p in patterns], initializers) + self.map = list(zip([re.compile(p) for p in patterns], initializers)) def __call__(self, name, arr): for prog, init in self.map: