Deep Learning with Multiple GPUs on Rescale: Torch
The downside of this is that Torch documentation often falls behind implementation, so unless you find an example on github for exactly what you want to do, it can be a challenge to figure out which Torch modules you should be using and how to use them. Now let's convert it to run on a GPU (this example will only run if you have a CUDA-compatible GPU): To run this on a GPU, we call cuda()on the network and then make the input a CudaTensor. This puts a convolutional layer and a ReLU layer on each GPU. The forward and backward passes must propagate the outputs between GPU 1 and GPU 2. So instead of running the forward and backward passes over the original Sequential container, we now run it on the DataParallelTable container and the data is distributed to copies of the network on each GPU. After running the training for 10 epochs, we see the 4 GPU job runs about 3.33 times faster than the single GPU job.
Dec-11-2016, 13:55:14 GMT
- Technology: