Behaviour of freeze_block and unfreeze_block
I was using the ResNet freeze_block method as follows
resnet.model.freeze_block([0,1,2,3,4,5]) #freeze all 6 blocks
# now train the model for a while ...
resnet.model.freeze_block([0,1,2,3,4,5]) #freeze only the first 5 blocks
# continue training ...
However, eventually I realized that this was the wrong use of this method. To achieve the desired result, I had to do as follows,
resnet.model.freeze_block([0,1,2,3,4,5]) #freeze all 6 blocks
# now train the model for a while ...
resnet.model.unfreeze_block([5]) #unfreeze the last block
# continue training ...
I am wondering if other users might be fooled by this too?
Would it be more intuitive to implement the freeze_block
in a manner so that past history of freezing layers is forgotten?
Or perhaps we could add an argument to enable such use?
Or at least highlight this in the doc string as a potential pitfall, e.g., via an example.
@fsfrazao what do you think?
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information