You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I add extra character(for instance standard length of symbols was 35) or remove one letter, I get this error. But if I just replace one letter with another everything is okay. How to fix this?(I'm using russian alphabet, upper and lower characters)
(I checked a lot of issues, but didn't find mine)
PS E:\VScodeProjects\draft> py deep-text-recognition-benchmark\train.py --train_data lmdb_output --valid_data lmdb_output --select_data "/" --batch_ratio 1.0 --Transformation TPS --FeatureExtraction ResNet --SequenceModeling BiLSTM --Prediction Attn --batch_size 2 --data_filtering_off --workers 0 --batch_max_length 80 --num_iter 100 --valInterval 5 --saved_model TPS-ResNet-BiLSTM-Attn.pth
--------------------------------------------------------------------------------
dataset_root: lmdb_output
opt.select_data: ['/']
opt.batch_ratio: ['1.0']
--------------------------------------------------------------------------------
dataset_root: lmdb_output dataset: /
sub-directory: /. num samples: 10
num total samples of /: 10 x 1.0 (total_data_usage_ratio) = 10
num samples of / per batch: 2 x 1.0 (batch_ratio) = 2
--------------------------------------------------------------------------------
Total_batch_size: 2 = 2
--------------------------------------------------------------------------------
dataset_root: lmdb_output dataset: /
sub-directory: /. num samples: 10
--------------------------------------------------------------------------------
model input parameters 32 100 20 1 512 256 76 80 TPS ResNet BiLSTM Attn
Skip Transformation.LocalizationNetwork.localization_fc2.weight as it is already initialized
Skip Transformation.LocalizationNetwork.localization_fc2.bias as it is already initialized
loading pretrained model from TPS-ResNet-BiLSTM-Attn.pth
Traceback (most recent call last):
File "E:\VScodeProjects\draft\deep-text-recognition-benchmark\train.py", line 319, in <module>
train(opt)
File "E:\VScodeProjects\draft\deep-text-recognition-benchmark\train.py", line 88, in train
model.load_state_dict(torch.load(opt.saved_model,map_location='cpu'))
File "E:\python\lib\site-packages\torch\nn\modules\module.py", line 2153, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
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, 332]).
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([76, 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([76]).
I only get that there's something wrong in architecture when I do this.
The text was updated successfully, but these errors were encountered:
When I add extra character(for instance standard length of symbols was 35) or remove one letter, I get this error. But if I just replace one letter with another everything is okay. How to fix this?(I'm using russian alphabet, upper and lower characters)
(I checked a lot of issues, but didn't find mine)
I only get that there's something wrong in architecture when I do this.
The text was updated successfully, but these errors were encountered: