Hamid:

@Atcold,  by checking if isinstance(m, nn.Linear) it would apply to linear module, correct?


Correct.


If I call the weight initialization, it would be applied to all layers?


Yup. All linear layers.


I have a residual module each having 2 linear layers. Then several of these modules.


Sure, it will apply the normalisation to each Module that belongs to the class nn.Linear.