PyTorch do not load weights if size mismatch

You could try to filter out the wrongly shaped parameters from the state_dict and try to load it using strict=False afterwards.

1 Like