Learn R Programming

rkeops (version 2.2.2)

relu.default: Element-wise ReLU function

Description

Element-wise ReLU (Rectified Linear Unit) function on numeric vectors (or objects which can be coerced to them).

Usage

# S3 method for default
relu(x)

Value

Vector or array containing the element-wise ReLU of x.

Arguments

x

numeric vectors or objects which can be coerced to such.

Author

Chloe Serre-Combe, Amelie Vernay

Details

The ReLU function fukushima_cognitron_1975rkeops is defined as follows: relu(x) returns 0 if x < 0, x if x >= 0.

References

fukushima_cognitron_1975rkeops

Examples

Run this code
relu(4)
relu(-10:10)

Run the code above in your browser using DataLab