reLU: Rectified Linear Unit activation functon

Description Usage Arguments Value Examples

View source: R/simpleNN.R

Description

sigmoid can take a scalar, vector or matrix and output elementwise application of the reLU nonlinearity/ squashing function. There is an additional boolean flag for calculating the derivative. The deriv argument is needed for activation functions.

Usage

1

Arguments

X

numeric scalar, vector or matrix

deriv

boolean indicating whether we should evaluate the function or the derivative at the input.

Value

Same format as the input X.

Examples

1
2
3
4
reLU(-5)
reLU(0)
reLU(5)
reLU(1,deriv=TRUE)

gumeo/mnistr documentation built on May 17, 2019, 9:27 a.m.