Welcome to lecture 6. In this video we will use transfer learning to train a new classifier for predicting strawberry brightness. Remember the standard procedure for training a classifier. With a label training dataset, we feed it into an algorithm. The outcome will be a classifier that we can store and with new input we can make predictions. With transfer learning you do it slightly differently. We will use the outcome of the pre-trained general model, the mobile net. We feed a strawberry image into this mobile net and take the outcome of the final layer of the neural network. This will simply be a list of numbers. But each number can be interpreted as something like the gettness or darkness or flowerness or table-ness of the image. This list of numbers or vector is then used to train a new algorithm, which makes a link between the outcome of the general model with our classes of brightness. With that in the end we have a new classifier that gives a probability for one of the brightness states. We will not use a convolutional neural network for doing this fine tuning. Instead we will use a much simpler K nearest neighbors algorithm. What it does is for a new image it looks at the series of numbers and then compares it to the list of numbers of images in the training set. Here you see that the four closest results are those of ripe strawberries. The prediction for this new image will then be that it is probably a ripe strawberry. Now how do we do this in code? In the baronad js file we first define a new classifier, the K&M classifier. Then we go through all the training images and then feed it to the mobile net. Here we use the net.infer method to get the list of numbers from the general model. We then add an example to the classifier, feeding at the list of numbers and the class ID of the training image. In this way we have given the K&M classifier all our training data. When we reload the web page we will see the real time training of a new classifier. All we have to do now is test if our classifier works.