caffe icon indicating copy to clipboard operation
caffe copied to clipboard

About GPU Acceleration

Open wzq12138 opened this issue 11 years ago • 2 comments

Hello ,everyone,I am new to CAFFE and gpu ,I wan to know the GPU is acceleration on tranining or on test ,I mean if I have model now ,then I use the python to classifiy something,when I running python ,is caffe and gpu accelering now?how can I know the time.

wzq12138 avatar Feb 10 '15 07:02 wzq12138

Hi wzq12138,

In both training and python it is possible to select either the GPU or the CPU as a computation backend.

When training you can specify the following in your solver file: /# solver mode: CPU or GPU solver_mode: GPU

In you python program you will have something along the lines of: net = caffe.Classifier(MODEL_FILE, PRETRAINED)

Afterwards you can use the functions to specify GPU/CPU computation. net.set_mode_gpu() net.set_mode_cpu()

You can then time the differences.

This is a usage question and should be closed, it probably belongs in the mailing list.

BlGene avatar Feb 10 '15 14:02 BlGene

BlGene seems to have thoroughly answered your question (thanks for the help!).

As he indicated, the issues tracker is for development discussion, so if you have any more usage questions please ask them on caffe-users!

erictzeng avatar Feb 14 '15 00:02 erictzeng