Transfer learning helps us solve a new problem using fewer examples by using information gained from solving other related tasks. It is a technique where we reuse a learned model trained on a different dataset to solve a similar but different problem. In transfer learning, we extend the learning of a pre-trained model in our network and build a new model to solve a new learning problem. The keras library in R provides many pre-trained models; we will be using one such model called as VGG16 to train our network.
Implementing transfer learning
Getting ready
We will start by importing the keras library into our environment:
library(keras)
In this example, we will work with a subset of the Dogs versus Cats dataset from...