Professional Documents
Culture Documents
Transfer Learning
Transfer Learning
tensorBrew
Transfer
Learning
tensorBrew
What is Transfer Learning?
★ For example, it’s easier to pick-up Tennis once you know Badminton
tensorBrew
Why Transfer Learning is important in
Deep Learning?
❏ Deep Learning architectures are very deep and require lots of data to train
tensorBrew
What does Transfer Learning mean in Deep Learning?
tensorBrew
Suppose we have trained
a Classifier (Model#1) on
5 handwritten digits (0-4)
tensorBrew
Can we use knowledge from Model#1to build another model which can
classify digits 5 to 9
tensorBrew
Can we use knowledge from Model#1to build another model which can
classify digits 0 to 4 in a ‘number plate’
tensorBrew
Can we use knowledge from Model#1to build
another model which can classify Alphabets
tensorBrew
Applications of
Transfer Learning
tensorBrew
Classifying Medical images
e.g Disease Identification
tensorBrew
Object Detection
tensorBrew
Image Segmentation
tensorBrew
How to implement
Transfer Learning?
tensorBrew
Conv + Conv + Conv + Classifier
Class
Image Data Pooling Pooling Pooling Layers Probabilities
Layers Layers Layers (Dense)
tensorBrew
Conv + Conv + Conv + Classifier
Class
Image Data Pooling Pooling Pooling Layers Probabilities
Layers Layers Layers (Dense)
Features extractor
Convolutional layers act as Feature extractor while Dense Layer is used to classify
image (using features extracted by Conv Layers)
tensorBrew
Conv + Conv + Conv + Classifier Class
Image Data Pooling Pooling Pooling Layers Probabilitie
Layers Layers Layers (Dense) s
Source: Feature Visualization of Convnet trained on ImageNet from [Zeiler & Fergus 2013]
Different Conv layers learn different features, later Conv Layers combine
features from earlier layers
tensorBrew
Conv + Conv + Conv + Classifier Class
Image Data Pooling Pooling Pooling Layers Probabilitie
Layers Layers Layers (Dense) s
Source: Feature Visualization of Convnet trained on ImageNet from [Zeiler & Fergus 2013]
Different Conv layers learn different features, later Conv Layers combine features from
earlier layers
tensorBrew
Conv + Conv + Conv + Classifier
Class
Image Data Pooling Pooling Pooling Layers Probabilities
Layers Layers Layers (Dense)
tensorBrew
Conv + Conv + Conv + Classifier
New task Class
Data
Pooling Pooling Pooling Layers Probabilities
Layers Layers Layers (Dense)
NEW Class
Freeze
Layers
Classifier Probabilities
Features
Layers for NEW
task
(Dense)
tensorBrew
Retrained
SoftMax
FC 1000
FC 4096
FC 4096
VGGNet for Transfer Learning
Pool 3x3
Conv 3x3, 512
Conv 3x3, 512
Conv 3x3, 512
Conv 3x3, 512
Pool 3x3
Conv 3x3, 512
Conv 3x3, 512
Conv 3x3, 512
Conv 3x3, 512
Frozen
Pool
Conv 3x3, 256
Conv 3x3, 256
Pool
Conv 3x3, 128
Conv 3x3, 128
Pool
Conv 3x3, 64
Conv 3x3, 64
Input
Should we freeze All
Convolutional Layers?
tensorBrew
Transfer Learning Strategy
Small Dataset
Freeze all except last few Convolutional Train entire Model (No Conv layer to
Layers be Frozen)
Summary
tensorBrew