How Transfer Learning works

How Transfer Learning works

How Transfer Learning works. “Transfer Learning will be the next driver of ML success” — Andrew Ng. Transfer Learning is the process of taking a pre-trained neural network and adapting the neural network to a new different dataset by transferring or repurposing the learned features.

Transfer Learning is the process of taking a pre-trained neural network and adapting the neural network to a new different dataset by transferring or repurposing the learned features. For example, we take a model trained on ImageNet and use the learned weight in that model to initialize the training and classification of an entirely new dataset. For example, in research work by published by Sebastrian Thrun and his team, 129,450 clinical skin cancer images were classified using pre-trained models and it achieved excellent results. The approach achieves performance at the same level with results from experts on two tasks: skin cancer identification and identification of deadliest skin cancer tasks. This is just an example that shows us that artificial intelligence is indeed capable of classifying skin cancer with a level of competence comparable to dermatologists. The CEO of DeepMind has this to say on transfer learning:

“I think transfer learning is the key to general intelligence. And I think the key to doing transfer learning will be the acquisition of conceptual knowledge that is abstracted away from perceptual details of where you learned it from”- Demis Hassabis (CEO DeepMind)

Transfer learning is also particularly useful with a limited computing resource. A lof of state of the art models takes several days and weeks in some cases to train even when trained on highly powerful GPU machines. Thus, in order not to repeat the same process over a long period of time, transfer learning allows us to make use of pre-trained weights as a starting point.

Learning from scratch is hard to do and difficult to achieve the same performance level as in transfer learning approach. To put in perspective, I used an AlexNet architecture to train a dog breed classifier from scratch and achieved 10% accuracy after 200 epochs. The same AlexNet pre-trained on ImageNet, when used with freeze weights, achieved 69% accuracy over 50 epochs.

Transfer learning often involves taking the pre-trained weights in the first layers which are often general to many datasets and initializing the last layers randomly with and training them for classification purpose. Thus, in transfer learning approach, learning or backpropagation occurs only at the last layers initialized with random weights. Meanwhile, there are several approaches to transfer learning and the approach we use is dependent on the nature of our new dataset we want to classify with respect to the dataset of the pre-trained models. There are four main scenarios or cases of transfer learning.

transfer-learning deep-learning neural-networks machine-learning

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Google Reveals "What is being Transferred” in Transfer Learning

Google Reveals "What is being Transferred” in Transfer Learning. Recently, researchers from Google proposed the solution of a very fundamental question in the machine learning community.

Deep Learning 101 —  Neural Networks Explained

The past few decades have witnessed a massive boom in the penetration as well as the power of computation, and amidst this information.

Explain Deep Learning Neural Networks to your grandma

“You do not really understand something unless you can explain it to your grandmother” Not sure where this quote originally came from, it is sometimes kind of half-attributed to Albert Einstein.

Deep Learning Explained in Layman's Terms

Deep Learning Explained in Layman's Terms. In this post, you will get to learn deep learning through a simple explanation (layman terms) and examples.

Transfer learning for Deep Neural Networks using TensorFlow

A practical and hands-on example to know how to use transfer learning using TensorFlow. We will learn how to use transfer learning for a classification task.