Solved – How to backpropagation through convolutional neural networks be vectorized

conv-neural-networkcorrelationdeep learningmachine learningneural networks

I have got a good grasp of backpropagation algorithm for fully connected neural networks and I can derive the vectorized implementation for it but after getting into convulutional networks, I think due to my not-so-strong linear algebra background, I have a lot of trouble trying to come up with a fully vectorized implementation for backpropagation.

The network architecture is as follows :-

Input->conv->relu->pool->fully_connected_network

I have used only one convolutional Layer for simplifaication

How can the vectorized implementation of this network be derived ?

Best Answer

  1. Convert all kernels to columns and get a kernels matrix
  2. Split your input (image) on slices for convolution then convert to columns and get an input matrix. You can append other inputs (images) to form a mini-batch
  3. multiply transposed input matrix on kernels matrix. In the result matrix each column is one feature map.

Look here for more details