Keras-yolo3: Why use freezing layers?

Created on 24 Jul 2018  ·  5Comments  ·  Source: qqwweee/keras-yolo3

Why use freezing layers?
Is it for small GPU memory? or for obtaining the training stability ?

By the way, is there no possibility of making training precision down, by freezing layers first?

Most helpful comment

In general, training the whole net on some data will most likely get a better output precision than only training the last layer and freezing the rest.
However, when you want to train on a new dataset with different classes than the original dataset (e.g. coco), you can only train the last layer and you will get already really good results, even if you only have a small training set. If you have sufficient large number of training images, then it is probabliy a better idea to unfreeze layers

All 5 comments

Freezing the layers will decrease the training time a lot, since the backpropagation only needs to pass through the final layer and not all layers. For many problems it is sufficient to only train the final layer and the rest can remain the same. I think the GPU memory is also reduced when freezing. I dont know about training stability, but I guess this is not the main reason for freezing and it will only have a small effect on that.

Hi, stefanbo92,
Thank you very much for your help.

For many problems it is sufficient to only train the final layer and the rest can remain the same.

However, in general, doing this will makes the output(decision) precision down, right?

In general, training the whole net on some data will most likely get a better output precision than only training the last layer and freezing the rest.
However, when you want to train on a new dataset with different classes than the original dataset (e.g. coco), you can only train the last layer and you will get already really good results, even if you only have a small training set. If you have sufficient large number of training images, then it is probabliy a better idea to unfreeze layers

stefanbo92,
I really appreciate your answer!

Was this page helpful?
0 / 5 - 0 ratings