Fine-tuning Several Layers of ResNext/Inception like Models

Made a typo in original posting: I’ve meant “can’t just unfreeze”

With models like VGG16/19, having a bunch of CNN layers followed by a couple FCs, fine tuning process seems to be quite straightforward, i.e. just freezing all layers with pre-trained weights and un-freezing only a few ones starting from the end. (Like N, N-1, etc.)

But if talking about more sophisticated architectures like Inception or ResNe(x)t, then the process is not so obvious. I know that in most cases you just replace the topmost fully-connected layer with a new one with required number of classes. But what if I want “to go deeper” and re-train other layers as well?

I guess I can’t just un-freeze layer N-1, right? Do I need to unfreeze the whole group of them? I mean, there are several paths in such networks and a lot of interconnections. As I can see from fastai package code, it operates in terms of groups, and not separate layers.

1 Like

Unfreeze the whole network, then freeze_to(). Note that freeze_to() refers to groups, not single layers (As you correctly pointed out).

1 Like