Given a 2D(M x N) matrix, and a 2D Gaussian Mask(K x K), how do i return a matrix that is the result of Gaussian pooling using the given kernel over the image?
I'd like to use numpy if possible(Not Using "for", only use numpy) eg of 2x2 Gaussian pooling:(It could be wrong answer)
matrix:
array([[ 20, 200, -5, 23, 10, -50],
[ -13, 134, 119, 100, 45, -79],
[ 120, 32, 49, 25, 13, 0],
[ 40, 12, 59, 23, 32, -1],
[ 75, 121, 69, 67, 64, -7],
[ 39, 12, 79, -8, 16, -9]])
kernel:
array([[ 1/16, 1/8, 1/16],
[ 1/8, 1/4, 1/8],
[ 1/16, 1/8, 1/16]])
soln:
array([[ 87.25, 16.625],
[ 64.8125, 29.8125]])