I havent been able to understand hook yet   … the lack of good explanation/example feels for that 
BTW link that you provide is going to “Set up a Docs Mirror in China” 
When i do what you mentioned i get this error for for n, m in resnet101.named_module():
that:  AttributeError: 'ResNet' object has no attribute 'named_module'