Hello and Greetings,

i have learning from Andrew NJ how to calculate the convolution manually say we have an array like:

array([ [ 3, 3, 2, 1, 0],

[0, 0, 1, 3, 1],

[3, 1, 2, 2, 3],

[2, 0, 0, 2, 2],

[2, 0, 0, 2, 1]

])

convoluted with a filter like :

array([ [0, 1, 2],

[2, 2, 0],

[0, 1, 2]]

)

so the result should be :

array([ [12, 12, 17],

[10, 17, 19],

[9, 6, 14]]

)

==>I applied the rule that : n-f+1=the output size .In this case 5-3+1=3 ,hence 3 by 3 is the shape of the output size.

Actually i am confused , when i applied the algorithm here in the screen shot i get another result .

Could someone help me, please?

here the video of Andrew Nj about calculating the convolution manually :

here the example i used here :

Thank you in advance