neural-networkprotocol-buffersdeep-learningcaffe

What do BACKEND and SCALE mean in data layer definition?


I'm new to Caffe and I am following MNIST handwritten digits recognize example.

When seeing

layer {
  name: "mnist"
  type: "Data"
  transform_param {
    scale: 0.00390625
  }
  data_param {
    source: "mnist_train_lmdb"
    backend: LMDB
    batch_size: 64
  }
  top: "data"
  top: "label"
}

I was confused by the parameters.

Could somebody explain what do the backend and scale parameter mean Where can I find the definition of such params?


Solution

  • When facing confusing parameters in caffe's prototxt, you can always look at the $CAFFE_ROOT/src/caffe/caffe.proto file that defines the parameters. Most values have comments explaining them.

    As for the parameters in your question,
    Caffe supports two types of datasets for the "Data" layer: and . The backend paramter allows you to specify what type is your input dataset LEVELDB or LMDB.

    The scale parameter is part of the transform_param, the comment in caffe.proto reads:

    // For data pre-processing, we can do simple scaling and subtracting the
    // data mean, if provided. Note that the mean subtraction is always carried
    // out before scaling.