1
votes

Suppose pass our input image into a convolutional layer as in the sample caffe net:

layer {
  name: "conv1"
  type: "Convolution"
  bottom: "data"
  .
  .
  .
  convolution_param {
    num_output: 96
    kernel_size: 11
    stride: 4
  }
  .
  .
  .
}

How can the network give us exactly the number of outputs we want while also using precisely the size and stride of the convolution kernel that it's given? Shouldn't kernel size and stride already determine the number of outputs we will get (modulo padding decisions)?

If I had a 5x5 image, convolved it with a 3x3 kernel using stride 2 and zero padding the boundary, then I would expect to get a 3x3 output from the convolution. But what if I ask for num_output: 5? Or num_output: 100?

1

1 Answers

1
votes

After some experimentation, it looks this num_output parameter actually determines how many times you convolve the kernel with the entire image (at least in the single-channel-image case). So it in fact does not interact with the width and height values of the image and filter at all.