Analytics Vidhya
Published in

Analytics Vidhya

Transfer Learning

Introduction

As humans growing and learning in day-to-day activities right from childhood. As humans acquire knowledge by learning one task. By using the same knowledge we tend to solve the related task. Say in real-time scenarios as

Transfer Learning in ML

Traditional ML used to create a separate model for each task/domain provided. There is no knowledge base for saving the model. Transfer Learning used to have a knowledge base to store the model trained /utilized for the specific task/domain. Further, we can use the same knowledge to train the new model.

To make a better understanding consider the example to implement the two possible scenarios as

Let’s start doing the task using traditional ML, we need to create the two models namely Model A & Model B. Where Model A used to implement task T1 and Model B used to implement task T2. In the end, by using the respective model of A & B, can detect the object based on the business needs.

Okay!!. If we go for the Transfer Learning approach the below one will be accomplished. If we start to implement task T1 create the new model using deep learning as (TFOD, CV2…etc) detect the objects in the restaurant and finally save the model to the knowledge base. To implement task T2 we don’t need to create another new model rather take the saved model from the knowledge base. From the saved model, we can use it for task T2 as well. From both ask having similarities of object detection, so we can opt for transfer learning as optimum implementation for this. If the task having lane detection/traffic light detection means, we can’t use the same model to train the data.

Let’s implement the Binary classification using Python. Here we use the Keras mnist dataset. Train the model with optimized parameters and finally save the model. Use the saved model for binary classification. Let’s see how can achieve in transfer learning methodology.

Hope this article gives you a better idea of Transfer Learning.

Thanks for reading the article :)

See you soon at my next one !!!

--

--

Analytics Vidhya is a community of Analytics and Data Science professionals. We are building the next-gen data science ecosystem https://www.analyticsvidhya.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Antony Christopher

Data Science and Machine Learning enthusiast | Software Architect | Full stack developer