Update only the last layer of the pretrained model during finetuning #2596
Unanswered
snat1505027
asked this question in
Q&A
Replies: 1 comment
-
Hey @snat1505027 , check out the Transfer Learning guide's Optimization section. It shows how to use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to finetune only the last layer (
proj
) of a pretrained model. Initially the parameters is loaded from the checkpoint and converted to afrozenDict
. I tried to update only theproj
layer values with this in thefinetune_step
:But I am getting worst validation loss with this. I am not sure whether this is the right approach.
Here is my code:
Beta Was this translation helpful? Give feedback.
All reactions