caffe time vs caffe train

1,019 views
Skip to first unread message

Rengan Xu

unread,
Sep 23, 2016, 12:16:55 PM9/23/16
to Caffe Users
Hi Caffe Users,

I am new to Caffe. Recently I have installed caffe and run it with some standard datasets. But I do not understand the difference between the following two commands in the tutorial website:

./build/tools/caffe train --solver=models/bvlc_reference_caffenet/solver.prototxt
./build/tools/caffe time --model=models/bvlc_reference_caffenet/train_val.prototxt

I know the "caffe train" command is used to train the model and it will generate *.caffemodel file. I usually use "time ./build/tools/caffe train" to get the training time. 
But I do not know what does "caffe time" do. It does not generate any file. So what does this command exactly do and what time it is measuring. I also found "caffe time" cannot
use multiple GPUs, it always uses only 1 GPU. So can anyone explain the difference of these two commands? Thanks.

Regards,
Rengan

Przemek D

unread,
Sep 26, 2016, 8:22:00 AM9/26/16
to Caffe Users
caffe time is supposed to be a benchmark tool, that is: it measures execution time for a given network model (regardless of weights and input data which you don't even have to pass). It can calculate per-layer forward and backward times and give you some idea what parts of your network are computationally heavy. However, there exists (to my knowledge) no detailed documentation for this tool, so I can't say how precise are those times or what exactly is happening during the measurement (in fact, I asked a separate question about this).
caffe train is just what you said it is - you pass a model definition and solver file (optionally also some pretrained weights or a previous solver state to resume training) and train your network, obtaining a .caffemodel plus some logs as an output.
Reply all
Reply to author
Forward
0 new messages