My model's layer's size changed during training


I’m currently using 3DefficientNet and When I try to load the state_dict file I have a error like this so I found out why this error came up. And the problem was that the size of the layer have changed during the training. I don’t want this thing to happen… Does any body have solution for this?