-
Notifications
You must be signed in to change notification settings - Fork 63
Setup Guide: Multi GPU Training of Neural Networks
PMLS-Caffe also supports multi-GPU training of neural networks on one machine. If you want to use this feature, make sure you have successfully installed PMLS-Caffe by following our installation guide and you also have prior knowledge about how to start a training instance under PMLS-Caffe by reading our setup guide for distributed training.
To enable multiple-GPU training, one need to specify the GPU device IDs in the starting script. For example, suppose you are going to train GoogleNet using 2 machines, each of which has two GPUs with device ID 0 and 1, in total 4 GPUs.
-
First set the machine IPs and ports in the
localserver
. -
Then specify
device = [0, 1]
inexamples/googlenet/run_local.py
, or if you prefer bash script, specify device IDs asdevice="0,1"
and setnum_app_threads=2
inexample/googlenet/train_googlent.sh
. -
Start the script.
The log will show both GPUs are enabled for training in every machine.