I am trying to replicate the output of a convolution in Caffe.
As far as I understand, Caffe uses the im2col algorithm to cast nD arrays into matrices and multiply them together. However, the dimensions of the output in Caffe confuse me.
Using the ImageData layer, I input 4 images of dimension 150x149 with a batch size of 4. Caffe creates a 4D array with dimensions 4x3x149x150.
I convolve these with a convolution layer with a filter of size 7 and a stride of 1 (num_output = 1 & bias = the zero vector). This means that the weights are of dimensions 1x3x7x7. As far as I understand, if the stride is 1, the filter should be applied to every element and the output should have the same dimensions as the input. What I get, however, is an output of the following dimensionality: 4x1x143x144.
I don't see how this is possible. How would one carry out the same operations in Matlab (or whatever)?
How do you get from the input to the output?