3

caffe'doc says that:

layer {
  name: "upsample", type: "Deconvolution"
  bottom: "{{bottom_name}}" top: "{{top_name}}"
  convolution_param {
    kernel_size: {{2 * factor - factor % 2}} stride: {{factor}}
    num_output: {{C}} group: {{C}}
    pad: {{ceil((factor - 1) / 2.)}}
    weight_filler: { type: "bilinear" } bias_term: false
  }
  param { lr_mult: 0 decay_mult: 0 }
}

I have no idea why to set kenrel_size, stride, and pad like this?

wang
  • 55
  • 1
  • 11

1 Answers1

1

for upsampling, if you want resize factor to be 2, then the parameter would be kernel_size: 4, stride:2, pad:1

VictorLi
  • 211
  • 3
  • 4