Training models inside hooks

I would like to train some linear layers on top of different intermediate layers in my network. Is this possible to do with hooks ? i.e : initialize my backbone feature extractor and freeze it; Initialize multiple linear layers and run the forward and backward of these models in nn.hooks ?

Yes, forward hooks allow you to use the forward activation, which could then be fed to another model for training.