13

My doubt is how do I backpropagate error in the Pooling layer, because when I calculate the derivative, there is only 1 element of 4 (for example, when using a 2x2 pooling kernel) that affects the result of the feedforward.

Malvrok
  • 369
  • 4
  • 16
  • 2
    I'm voting to close this question as off-topic because http://datascience.stackexchange.com – Martin Thoma Nov 21 '16 at 13:34
  • How can i move this post to http://datascience.stackexchange.com ? – Malvrok Nov 21 '16 at 13:56
  • Don't worry - the community will decide if this should be done. If 5 people (and a moderator?) think so, then it will be moved automatically and you will get a notice. – Martin Thoma Nov 21 '16 at 16:00
  • @Martin Thomas: Not sure this is off-topic, after all there is a backpropagation tag on SO, and the question concerns its implementation. Anyhow I don't have enough reputation to have a says in this :) – Ash Nov 21 '16 at 18:56

1 Answers1

14

Suppose you have a matrix M of four elements

a  b
c  d

and maxpool(M) returns d. Then, the maxpool function really only depends on d. So, the derivative of maxpool relative to d is 1, and its derivative relative to a,b,c is zero. So you backpropagate 1 to the unit corresponding to d, and you backpropagate zero for the other units.

Ash
  • 4,611
  • 6
  • 27
  • 41