techtree / Glue math / ← prev 10 of 26 next →

Nonlinearity (ReLU)

Clip negatives to zero, entry by entry; the bend that makes layers useful.

42 seconds

Transcript

Here is a very simple function. If a number is negative, make it zero. Otherwise, leave it alone.

Three stays three. Minus two becomes zero. Zero stays zero.

Draw it as a graph. Flat along zero on the left, and a straight ramp on the right.

Two straight pieces, joined by one bend. So the whole thing is not a straight line.

It is called ReLU.

On a vector, it works on each entry by itself. Two stays two. Minus one becomes zero. One half stays. Minus three becomes zero.

Negatives become zero. Everything else passes through.