Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is 'top' parameter in caffe

I am trying to run a caffe Experiment.I am using the following loss layer in my Train.prototxt,

layer {
  name: "loss"
  type: "SoftmaxWithLoss"
  bottom: "ip2"
  bottom: "label"
  include {
    phase: TRAIN
  }
}

I see the following configuration being displayed when the training is started,

I0923 21:19:13.101313 26423 net.cpp:410] loss <- ip2
I0923 21:19:13.101323 26423 net.cpp:410] loss <- label
I0923 21:19:13.101339 26423 net.cpp:368] loss -> (automatic)

I have not given top parameter in the loss layer.
What exactly the automatic(loss -> (automatic)) means here?

Thanks in advance!

like image 414
subha Avatar asked Feb 08 '23 23:02

subha


1 Answers

Caffe layers, including Loss layers, produce Blob (4-D arrays) as output of their computations. If you don't set a Blob name through the top parameter, the corresponding Blob will be added to the "output" of the net.

This means that, if you call the Net::forward() method, it will return a list of Blobs, i.e., the ones that are unbounded to be the input for another layer.

When you call the Caffe training tool, it automatically print to screen such Blobs. This way you can follow the value of loss or accuracy during training.

like image 190
Flavio Ferrara Avatar answered Feb 14 '23 08:02

Flavio Ferrara