VL_NNRELU - CNN rectified linear unit.

Y = VL_NNRELU(X) applies the rectified linear unit to the data X. X can have arbitrary size.

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

VL_NNRELU(...,'OPT',VALUE,...) takes the following options:

ADVANCED USAGE

As a further optimization, in the backward computation it is possible to replace X with Y, namely, if Y = VL_NNRELU(X), then VL_NNRELU(X,DZDY) gives the same result as VL_NNRELU(Y,DZDY). This is useful because it means that the buffer X does not need to be remembered in the backward pass.