deep-text-recognition-benchmark
deep-text-recognition-benchmark copied to clipboard
Special character fine tune with pre trained model
Shape mismatch is happening if I try to add extra 2 characters. Any solution for the same? If i want to do fine tuning on TPS-ResNet-BiLSTM-Attn.pth
RuntimeError: Error(s) in loading state_dict for DataParallel: size mismatch for module.Prediction.attention_cell.rnn.weight_ih: copying a param with shape torch.Size([1024, 294]) from checkpoint, the shape in current model is torch.Size([1024, 296]). size mismatch for module.Prediction.generator.weight: copying a param with shape torch.Size([38, 256]) from checkpoint, the shape in current model is torch.Size([40, 256]). size mismatch for module.Prediction.generator.bias: copying a param with shape torch.Size([38]) from checkpoint, the shape in current model is torch.Size([40]).
The only thing that worked for me is to train from scratch
I'm also interested in adding a few special characters but I cannot use TPS-ResNet-BiLSTM-Attn-case-sensitive.pth. Has anyone been able to solve this?
I also get the same error when I want to do a test. Is there a solution for this error?
I'm also interested in adding a few special characters but I cannot use TPS-ResNet-BiLSTM-Attn-case-sensitive.pth. Has anyone been able to solve this?
are you find any solution?
Shape mismatch is happening if I try to add extra 2 characters. Any solution for the same? If i want to do fine tuning on TPS-ResNet-BiLSTM-Attn.pth
RuntimeError: Error(s) in loading state_dict for DataParallel: size mismatch for module.Prediction.attention_cell.rnn.weight_ih: copying a param with shape torch.Size([1024, 294]) from checkpoint, the shape in current model is torch.Size([1024, 296]). size mismatch for module.Prediction.generator.weight: copying a param with shape torch.Size([38, 256]) from checkpoint, the shape in current model is torch.Size([40, 256]). size mismatch for module.Prediction.generator.bias: copying a param with shape torch.Size([38]) from checkpoint, the shape in current model is torch.Size([40]).
Please help me if you find a solution for this issue?