Can Caffe Data layer accept mean_values directly or is it only possible to do so using mean_file

16 views
Skip to first unread message

ani...@squadrun.co

unread,
Dec 6, 2017, 8:34:42 AM12/6/17
to Caffe Users
For Example consider the following code snipet:

layer {
  name
: "data"
  type
: "Data"
  top
: "data"
  include
{
    phase
: TRAIN
 
}
  transform_param
{
    crop_size
: 448
    mean_value
: 104.0
    mean_value
: 117.0
    mean_value
: 124.0
 
}
  data_param
{
    source
: "path/to/train/lmdb"
    batch_size
: 8
    backend
: LMDB
 
}
}

Is the above code snippet correct or are the mean_values {104, 117, 124} ignored and no pre -processing is done. Does that mean that mean subtraction for Data layer is only possible using mean_file argument?

Przemek D

unread,
Dec 7, 2017, 3:31:32 AM12/7/17
to Caffe Users
It's correct, assuming your LMDB contains 3-channel images. Read about how it works right in the caffe.proto file.

ani...@squadrun.co

unread,
Dec 7, 2017, 4:47:57 AM12/7/17
to Caffe Users
Thanks  Przemek . The link shared by you further clears all doubts.
Reply all
Reply to author
Forward
0 new messages