MXNET multi GPU
I am launching MXNET on a multi-GPU cluster for Alexnet and GoogLeNet.
- Is it supported? Is there anyway I can specify which GPU(s) to use?
- What are the best practices in term of settings? Should I use default ones as mentioned in: https://mxnet.readthedocs.org/en/latest/env_var.html#settings-for-more-gpu-parallelism
Are you trying to train networks on a single machine with multiple gpu or a cluster of multiple machines? Single machine multiple gpu is easily done with FeedForward(ctx=[mx.gpu(0), mx.gpu(1) ... ]). Multi machine distributed training can be done with this script: https://github.com/dmlc/mxnet/blob/master/tools/launch.py
Trying on a machine with multiple-GPUs. Can you please explain more how and where I can use FeedForward? I am new to this and using this command to run: $python example/image-classification/alexnet.py ---gpus all The alexnet.py is from here
use example/image-classification/train_imagenet.py --gpus=0,1,2,... It's explained in the doc. the evn variables should be left to default unless you know what you are doing.
Hi, train_imagenet is failing :(
~/mxnet$ python example/image-classification/train_imagenet.py --data-dir ~/data/mnist_train_lmdb/ --gpus=0,1
OpenCV is unavailable.
2016-02-08 16:35:26,821 Node[0] start with arguments Namespace(batch_size=32, clip_gradient=5.0, data_dir='/home/saonim/data/mnist_train_lmdb/', data_shape=224, gpus='0,1', kv_store='local', load_epoch=None, log_dir='/tmp/', log_file=None, lr=0.01, lr_factor=1, lr_factor_epoch=1, model_prefix=None, network='inception-bn', num_classes=1000, num_epochs=20, num_examples=1281167, train_dataset='train.rec', val_dataset='val.rec')
[16:35:26] src/io/iter_image_recordio.cc:212: ImageRecordIOParser: /home/saonim/data/mnist_train_lmdb/train.rec, use 4 threads for decoding..
Traceback (most recent call last):
File "example/image-classification/train_imagenet.py", line 85, in
The data is generated using this
dataset generated by caffe apparently won't work with mxnet. please read the doc and examples.
This is something related to my work. I have a question. Does "launch.py" enough to run a program in a distributed environment? I went through the file. It has MPI option. If I am using image_net with alexnet, can I run it using MPI on multi machines with launch.py?