ReLU Layer
R2026bLibraries:
Deep Learning Toolbox /
Deep Learning Layers /
Activation Layers
Description
The ReLU Layer block applies the rectified linear unit (ReLU) activation operation on layer input. ReLU activation performs a nonlinear threshold operation where any input value less than zero is set to zero.
This operation is equivalent to:
The exportNetworkToSimulink function generates this block to represent a reluLayer object.
Because it applies an element-wise operation, this block supports input data of any format and
outputs data that has the same dimensions and format as the input.
Examples
Ports
Input
Output
Parameters
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"dlactivationlib/ReLU Layer"
Example: add_block("dlactivationlib/ReLU Layer","myModel/myBlock",MakeNameUnique="on")
For information about programmatic access to individual block parameters, see the Programmatic Use section of parameter descriptions on this page.
Extended Capabilities
Version History
Introduced in R2024b


