PyTorch weight initialization for Alexnet and VGG model

I am new to pytorch, and I am confused when I go through the vision models of Alexnet and VGG, for Alexnet, there is no weight initialization function, and other models have., such as for VGG, there is a function def _initialize_weights(self). So my question is, why?

Hmm, maybe because it’s too old? But you can generate them by yourself by apply the init rule.

def init_weights(m):
    if isinstance(m, nn.Linear):
    elif isinstance(m, nn.Conv2d):

model = torchvisions.models.alexnet()