Adapt model num_output_labels from 116 to 117
#1
by
desaxce
- opened
Fix mismatch between model num_output_labels and linear weights dimension in checkpoint
While trying out your model, I stumbled upon the error message:
RuntimeError: Error(s) in loading state_dict for LaiaCRNN:
size mismatch for linear.weight: copying a param with shape torch.Size([117, 512]) from checkpoint, the shape in current model is torch.Size([116, 512]).
size mismatch for linear.bias: copying a param with shape torch.Size([117]) from checkpoint, the shape in current model is torch.Size([116]).
By aligning the num_output_labels
to match the 117 from the checkpoint, I could use it successfully.
Thanks for the upload !
desaxce
changed pull request status to
open
Hi! Thanks for fixing the issue!
I did not see the end of your message at first, so I actually pushed a new model myself, sorry about that. Anyway, the issue is now fixed :)
starride-teklia
changed pull request status to
closed