First of all, welcome to the PyTorch Community!!
Coming to your question,
I am pretty sure, when you were training it for the first time you somehow tweaked the resnet50 that comes with torchvision.
From what it seems, you have changed the final layer with (most probaby for transfer learning purposes)
fc.weight = nn.Linear(2048, 18425)

Probably you have not intended to do this. as I think you have calculated the 18425 and there was some bug in the code that resulted in 18425.
As for now, if you need to load this ckpt anyway, just load which ever parts are okay and manually take out the weights of fc.weight in the ckpt and take out a slice.
fc.weight[:, nc]

where nc is the number of classes you want. Store all these weights in a new_dict and then
sd = model.state_dict()
sd.update(new_dict)
model.load_state_dict(sd)

Make sure new_dict and sd have the same keys.