2
$\begingroup$

I want to be sure my understanding of the problem is correct. I want to do image classification and current state of the art in my field is achieved by transfer learning with VGG16.

Since image on this field are totaly different than image used by VGG16 trainig image, we should unfreeze "a lot" of layer.

Original VGG16 model has more than 130M parameter. it's has something like 13 hidden layer and 3 fully connected layer at the end. If I unfreeze only the fully connected layer i'll still have more than 80M parameter to train!! and i'll probably need to unfreeze some hidden layer to get better performance since my data are really different

So it's look like transfer learning with VGG16 require a lot of computation power

am I right? Is it possible to use transfer learning with image really different than training data without a lot of computational power?

$\endgroup$
1
$\begingroup$

Computational power depends on 3 factor -

  1. Parameters count
  2. Dataset size
  3. Number of epochs

In your case you are unfreezing a lot of hidden layer, so there are lot of parameters. Since you're doing transfer learning on image different than training dataset, you'll have to train for many epochs. So everything boils down to dataset size.

What you should do is find model trained on dataset similar to your new data. In that case you'll have to train very less parameters for very less number of epochs. That'll require very less computation.

For your last question, yes it is possible to do transfer learning for image different than training dataset, that does help but again you have to train for many epochs during transfer learning.

| improve this answer | |
$\endgroup$
  • $\begingroup$ thnaks that really help me! Just a small thing, I don't know if this is the same for every "big conv net" used for transfer learning but in vgg16, most of paramter are in last fully connected layers $\endgroup$ – akhetos Jun 27 '19 at 7:01
  • $\begingroup$ Most of the network uses 2 or more fully connected layers at the last. $\endgroup$ – ashukid Jun 27 '19 at 9:48
1
$\begingroup$

The dataset on which VGG16 is trained consists of images from different domains, and its purpose is to classify images by extracting images' feature maps and attributes. Unfreezing few botton layers will help in training them for our specific image usage, however, these will be few parameters to learn than the whole connected network as it will have already learned basic features.

When you choose to train only a few bottom layers of VGG16, it will definitely require less computation.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.