You are trying to load the ResNext state_dict into a ResNet, which won’t work out of the box.
To load the pretrained resnet18 parameters, you could use:
sd = models.resnet18(pretrained=True).state_dict()
model.load_state_dict(sd, strict=False)


for key in sd:
    ref = sd[key]
    actual = model.state_dict().get(key, None)
    if actual is not None:
        print((ref - actual).abs().max())
    else:
        print(key, ', not found in model')

The last loop is just a quick test to show, that the newly added nn.GroupNorm layers won’t be initialized.