learn.bn_freeze(True): how/when to use?

Looks like bn_freeze(True) following a call to learn.unfreeze() is mentioned in the Lesson3 notes
_http://forums.fast.ai/t/deeplearning-lecnotes3/7866_:

Note: If Images are of size between 200-500px and arch > 34 e.g. resnet50 then add bn_freeze(True)

learn.unfreeze()
learn.bn_freeze(True)
%time learn.fit([1e-5, 1e-4,1e-2], 1, cycle_len=1)

And the best discussion I could find as to why we should do this is here: Freezing batch norm - #3 by ravivijay but I’m still trying to wrap my head around it.

1 Like