Hello,
I want to make a custom model that works with the learn.freeze/unfreeze
methods.
What I need to implement?
My models has an encoder part that uses:
if freeze:
with torch.no_grad():
x = self.encoder(x)
else:
x = self.encoder(x)
Probably this is not the way , as looking at the freeze_to
method on optimizer I can see that only supports an index, and will freeze regarding this value.