Transfer Learning, is it Important to know?

Pavan Kunchala
Analytics Vidhya
Published in
3 min readJan 15, 2021

--

Yes, Transfer learning is a important part of Machine learning(ML) even though it is not a Machine Learning Technique but is used in many real world applications

Why is it Important?

When we humans learn we don’t exactly start from scratch ,we might (intentionally or unintentionally) have some knowledge of the thing we are trying to learn , so we use our previous experience while learning something new or trying to complete a new task . Now how is it related to ML ?

Courtesy of ShutterShock

ML models do something similar which uses its previous experience from some other task to complete the current task it is termed as Transfer Learning.

Transfer learning, used in machine learning, is the reuse of a pre-trained model on a new problem. In transfer learning, a machine exploits the knowledge gained from a previous task to improve generalization about another. For example, in training a classifier to predict whether an image contains food, you could use the knowledge it gained during training to recognize drinks.

The general idea is to use the knowledge a model has learned from a task with a lot of available labeled training data in a new task that doesn’t have much data. Instead of starting the learning process from scratch, we start with patterns learned from solving a related task.

How does it work?

To put it in ML terms it uses the pre-trained weights of the previous model to add the layers of this model so that it can recognize what the previous model could recognize without being explicitly trained on it

courtesy of medium

Advantages of Transfer learning

Using Transfer Learning has many advantages. The main advantages are basically that you save training time and that your neural network works better in most cases and you do not need a lot of data. You can build a solid machine learning model with relatively small training data because the model is already pre-trained.

This is especially valuable in natural language processing because mostly expert knowledge is required to create large labeled datasets. Additionally, training time is reduced because it can sometimes take days or even weeks to train a deep neural network from scratch on a complex task.

It could also work with tasks such as Object detection or Face-Recognition ,let’s say in a task such as Face-Recog if you use a pre-trained model it can already detect the face and then it will be easy for to compare faces encodings to recognize them

Note : Transfer Learning works only if the functions learned from the first task are generic, which means that they can also be useful in other related tasks.

The End!(at least for now)

PS: If you have any doubts you can mail me here , you can contact me on my linkedin from here and you can check out my other codes(it has really cool stuff) on my Github from here

I am also looking for Freelancing opportunities in the field of Deep Learning and Computer vision if you are willing to collaborate, mail me here( pavankunchalapk@gmail.com)

Have a wonderful day!

--

--

Pavan Kunchala
Analytics Vidhya

Machine learning & Computer Vision Engineer |Deep learning and Reinforcement learning enthusiast