# Train new data set using pre trained Single Shot Detector(VGG16) (transferred learning)

I'm new to this, know only the theory part of the stuff.

I want to train a neural network for detection of currently single class(will be extending to detect more classes)

I came across transferred learning, that explains as how to use a pre trained NN to train new data.

I selected a framework pytorch which has a nice tutorial explaining Transfer Learning

We have a pytorch implemented Single Shot Detector as well.

This is my current situation

• The data I want to train is different from the once trained already i.e 20 classes those have already been trained.
• I currently have a very limited labeleb data training set.

The solution is to freeze the weights of the initial few layers, and then train the NN.

I am confused as what exactly is meant by initial few layers?

This is a useful post I found online [Learning Note] Single Shot MultiBox Detector with Pytorch — Part 1 explaining how the Single Shot Detector works.

Can anyone help me how to perform these two tasks

1. What are the initial few layers here in this case? How exactly can I freeze them?
2. What are the changes I need to make while training the NN to classify one or more new classes?
• Welcome to StackExchange AI. Excellent question, however we prefer if you keep it one question per post. Once again excellent question, let the answers start coming! – Seth Simba Feb 20 '18 at 6:22

First question Initial few layers are said to extract the most general things those as seen in any kind of image like edges,corners,straight line. So I guess it actually would depend on the kind of backbone architecture you are selecting
Second Question A very silly question, Just need go through the entire algorithm in that framework and change just the number of classifications that the final layers outputs to the number of classes/objects you train it on.