โœจ Visual Editor

close

palette Canvas & Background

Gradient:arrow_forward
Text Color:
135ยฐ

style Card Style

40px
16px

text_fields Typography

16px
Akshay ๐Ÿš€
@akshay_pachaar
We've all dealt with activation functions while working with neural nets.

- Sigmoid
- Tanh
- ReLu & Leaky ReLu
- Gelu

Ever wondered why they are so importantโ“๐Ÿค”

Let me explain it to you in this ๐Ÿงต๐Ÿ‘‡
Thread image
Akshay ๐Ÿš€
@akshay_pachaar
Before we proceed I want you to understand something!

You can think of a layer in neural net as a function & multiple layers makes the network a composite function.

Now, a composite function consisting of individual linear functions is also linear.

Check this ๐Ÿ‘‡
Thread image
Akshay ๐Ÿš€
@akshay_pachaar
We have a simple neural net that does binary classification.

Scenario 1:
- Linear decision boundary
- Linear Activation function

Observe how the neural net is able to quickly learn & loss converges to zero.

Watch this ๐Ÿ‘‡
Video thumbnail
VIDEO
Akshay ๐Ÿš€
@akshay_pachaar
Scenario 2:
- Non Linear decision boundary
- Linear Activation function

Observe how the neural net struggles to learn & the loss consistently remains high!

With linear activations it's unable to create a non-linear decision boundary.

Watch this ๐Ÿ‘‡
Video thumbnail
VIDEO
Akshay ๐Ÿš€
@akshay_pachaar
Scenario 3:
- Non Linear decision boundary
- Non-linear Activation function (Sigmoid)

Observe how the neural net performs well this time.

With a non-linear activation function we give the network ability to create a non-linear decision boundary.

Watch this ๐Ÿ‘‡
Video thumbnail
VIDEO
Akshay ๐Ÿš€
@akshay_pachaar
Now we understand why activation functions are important.

Next time we see why do we need different flavours of these non-linear activation functions.

What are the advantages of one over other.

You can play around like i did in the videos here ๐Ÿ‘‡
playground.tensorflow.org
Akshay ๐Ÿš€
@akshay_pachaar
That's a wrap!

If you interested in:

- Python ๐Ÿ
- Data Science ๐Ÿ“ˆ
- Machine Learning ๐Ÿค–
- Maths for ML ๐Ÿงฎ
- MLOps ๐Ÿ› 
- NLP ๐Ÿ—ฃ
- Computer Vision ๐ŸŽฅ
- LLMs ๐Ÿง 

I'm sharing daily content over here, follow me โ†’ @akshay_pachaar if you haven't already!!

Cheers!! ๐Ÿ™‚
Generated by Thread Navigator
100%
view_carousel Carousel Studio NEW
Press โŒ˜ + S to quick-export