relu_p: Derivative of ReLU

Description Usage Arguments Value Author(s) Examples

View source: R/relu_p.R

Description

Apply derivative of the rectified linear unit (ReLU).

Usage

1
relu_p(v)

Arguments

v

a numeric vector or matrix

Value

the original vector with positive values to 1 and negative values to zero

Author(s)

(refer to CASL p218)

Examples

1
2
3
4
## Not run: 
relu(c(0, -1, 3, -5, 7))

## End(Not run)

yijunyang/bis557 documentation built on Dec. 21, 2020, 3:06 a.m.