1

In a recent discussion, I found out that some parts of the deploy.prototxt exist only because they have been directly copied from the train_test.prototxt and are ignored during testing. For example:

    layer {
  name: "conv1"
  type: "Convolution"
  bottom: "data"
  top: "conv1"
  param {                     #Starting here
    lr_mult: 1
  }
  param {
    lr_mult: 2
  }                           #To here
  convolution_param {         #is this section useful?
    num_output: 20
    kernel_size: 5
    stride: 1
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
    }
  }
}

I was told that the section containing LR for weights as biases was useless in deploy files and could be deleted. This got me thinking, is the convolution_param portion absolutely required? If yes, do we still have to define the weight and bias fillers as we will only do testing using this file and fillers are initialized only when we need to train a network. Is there any other detail that is unnecessary?

Qazi
  • 345
  • 3
  • 16

2 Answers2

2

The convolution_param portion is required but you can remove weight_filler and bias_filler if you want.

Qazi
  • 345
  • 3
  • 16
Harsh Wardhan
  • 2,110
  • 10
  • 36
  • 51
  • Thank you Harsh! One small question though: Do I 'need' to remove it or I can if I want to and otherwise it won't be an issue anyway. – Qazi Apr 19 '16 at 09:05
2
layer {
  name: "conv1"
  type: "Convolution"
  bottom: "data"
  top: "conv1"
  convolution_param {
    num_output: 20
    kernel_size: 5
    stride: 1
  }
}

The above layer will run well during Test.

Anoop K. Prabhu
  • 5,417
  • 2
  • 26
  • 43