Hi!
Is the load_pretrained_model_from feature performing transfer learning with frozen layers, or would this need to be implemented somewhere else?
I would like to freeze all layers but the last one and train using a pretrained model. How should I do this? Maybe something like the following, but I don't really know where to write it.
efficientdet = self.system_dict["local"]["model"]
for p in efficientdet.parameters(): p.requires_grad = False
for p in efficientdet[-1].parameters(): p.requires_grad = True
Thank you in advance!
Hi!
Is the
load_pretrained_model_fromfeature performing transfer learning with frozen layers, or would this need to be implemented somewhere else?I would like to freeze all layers but the last one and train using a pretrained model. How should I do this? Maybe something like the following, but I don't really know where to write it.
efficientdet = self.system_dict["local"]["model"]for p in efficientdet.parameters(): p.requires_grad = Falsefor p in efficientdet[-1].parameters(): p.requires_grad = TrueThank you in advance!