The rectified linear unit: keeps positive inputs, replaces negative ones with 0.
In ML papers
ReLU(x)=max(0,x), applied elementwise to vectors. It is the default activation in many networks: cheap, and its gradient is 1 for positive inputs, which helps deep networks train. Its relatives GELU and SiLU are smooth versions used in Transformers.
How to type it
LaTeX
Shows
\operatorname{ReLU}(x)
ReLU(x)
A worked example
ReLU(−1,2,0.5)=(0,2,0.5)
The derivative is 0 for negative inputs and 1 for positive ones.