diff options
author | Evan Shelhamer <shelhamer@imaginarynumber.net> | 2015-08-07 13:56:49 -0700 |
---|---|---|
committer | Evan Shelhamer <shelhamer@imaginarynumber.net> | 2015-08-09 15:16:02 -0700 |
commit | 8771d0f4317fc0081d86b7637f5f5ceef5b92dfb (patch) | |
tree | bba6a66d53b16f206500b860925c9952ed8f18a3 /docs | |
parent | 335bee737cb2e715abe685e6029afc83ccd8f404 (diff) | |
download | caffeonacl-8771d0f4317fc0081d86b7637f5f5ceef5b92dfb.tar.gz caffeonacl-8771d0f4317fc0081d86b7637f5f5ceef5b92dfb.tar.bz2 caffeonacl-8771d0f4317fc0081d86b7637f5f5ceef5b92dfb.zip |
[docs] add multi-gpu usage note to interfaces
Diffstat (limited to 'docs')
-rw-r--r-- | docs/tutorial/interfaces.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/tutorial/interfaces.md b/docs/tutorial/interfaces.md index 40602948..9006179d 100644 --- a/docs/tutorial/interfaces.md +++ b/docs/tutorial/interfaces.md @@ -50,6 +50,13 @@ For a full example of fine-tuning, see examples/finetuning_on_flickr_style, but # query the first device caffe device_query -gpu 0 +**Parallelism**: the `-gpu` flag to the `caffe` tool can take a comma separated list of IDs to run on multiple GPUs. A solver and net will be instantiated for each GPU so the batch size is effectively multiplied by the number of GPUs. To reproduce single GPU training, reduce the batch size in the network definition accordingly. + + # train on GPUs 0 & 1 (doubling the batch size) + caffe train -solver examples/mnist/lenet_solver.prototxt -gpu 0,1 + # train on all GPUs (multiplying batch size by number of devices) + caffe train -solver examples/mnist/lenet_solver.prototxt -gpu all + ## Python The Python interface -- pycaffe -- is the `caffe` module and its scripts in caffe/python. `import caffe` to load models, do forward and backward, handle IO, visualize networks, and even instrument model solving. All model data, derivatives, and parameters are exposed for reading and writing. |