VL_NNSPNORM - CNN spatial normalization.

Y = VL_NNSPNORM(X, PARAM) computes the spatial normalization of the data X with parameters PARAM = [PH PW ALPHA BETA]. Here PH and PW define the size of the spatial neighbourhood used for nomalization.

For each feature channel, the function computes the sum of squares of X inside each rectangle, N2(i,j). It then divides each element of X as follows:

   Y(i,j) = X(i,j) / (1 + ALPHA * N2(i,j))^BETA.

DZDX = VL_NNSPNORM(X, PARAM, DZDY) computes the derivative of the block projected onto DZDY. DZDX and DZDY have the same dimensions as X and Y respectively.