DEV Community

Muhammad Abu Bakar
Muhammad Abu Bakar

Posted on

ML Series - Writeup 0 - Why the ReLU activation function is needed?

Assalam-u-Alaikum all;

Today I learnt about the ReLU (Rectified Linear Unit) activation function used by neurons in a neural network.

Imagine an scenario where we were given the input features [price, shipping cost, marketing, material], and we want to predict our item's demand.

To make a more accurate prediction, we add layers to this Neural Network, In our first layer the Neural Network tried to predict for three features [affordability, awareness, and preceived quality],

Now if we were to go with a sigmoid activation function, our layer 1's neuron associated with the awareness feature would only be capable of learning a binary value for the awareness feature, which indirectly translates to if people have knowledge about our product or not. This doesn't really sit well if u think about it. Because depending on the product people can not if it exists, be a little aware, significantly aware, or the product is a viral product (like those fidget spinners back in 2016).

So to provide the possibility for this to happen, we have the ReLU activation function, which can only learn non-negative values. Obviously, because no one can aware about a product on a negative scale.

This gives us a possibility that the neural networks we train are more powerful, given we use this activation function where it should be used. Instead if we only use the Sigmoid activation function instead.

Jazakallah! for taking out time towards reading this text.

Do correct me where and if I'm wrong.

Allah Hafiz for today.

Top comments (0)