Dear all, I am facing a strange issue and I need some inputs here. I save my model with torch.save(net.state_dict(), ‘saved_models/keypoints_model_2.pt’)
And when I want to load it I got the error which is provided in the picture below. What I do not understand, is this “checkpoint” - what is it doing - and in my model conv1 is declared as conv2d(1, 32, 4, stride = 2) and not of the dimensions [32, 1, 5, 5] (although it was the case in an earlier version of the model but I did not save it). Can someone can give some explanation  and if it is possible to correct this situation?
This lead me to the second question: I was able to save the model with :
torch.save(net, 'model3.pt')
and then load it with
net = torch.load('model_3.pt')
The net is supposed to take as input an image [1, 96, 96]  and output a tensor of dimension [32,1]
But when I am entering
output = net.forward(image)
actually the dimension of the output are equal to the dimension of the image… how is it possible?
Thank you very much for your feedback

pytorch_load_error.png1053×456 60.9 KB