I am trying to assign pre-trained weights to my vgg-face model using the following code:-
netClassifier = Vgg_face()  
weight_vggFace = torch.load(weights_path)  
netClassifier.load_state_dict(weight_vggFace)  

But im facing the following error, for which I could not find a proper solution. The error is as follows:-
While copying the parameter named "fc8.weight", whose dimensions in the model are torch.Size([2622, 4096, 1, 1]) and whose dimensions in the checkpoint are torch.Size([2622, 4096]).

Could someone kindly guide me on how to go about solving it.