PS D:\text_recgonition_code\MRN-main> python tiny_train.py --config=config/crnn_mrn.py --exp_name CRNN_real
D:\text_recgonition_code\MRN-main
Command line input: CUDA_VISIBLE_DEVICES=0 python tiny_train.py --config=config/crnn_mrn.py --exp_name CRNN_real
----------- CRNN_MRN ------------
No Transformation module specified
select_data: ['D:/text_recgonition_code/MRN-main/dataset/MLT17_IL/train_2017']
2702
num samples: 2687
dict has 1895 number characters
characters dict has: 1899
No Transformation module specified
mlp DM_Router(
(norm): LayerNorm((256,), eps=1e-05, elementwise_affine=True)
(proj_1): Linear(in_features=256, out_features=512, bias=True)
(activation): GELU(approximate=none)
(spatial_gating): SpatialDomainGating(
(norm): LayerNorm((256,), eps=1e-05, elementwise_affine=True)
(proj): Linear(in_features=63, out_features=63, bias=True)
)
(channel_gating): ChannelDomainGating(
(norm): LayerNorm((63,), eps=1e-05, elementwise_affine=True)
(proj): Linear(in_features=256, out_features=256, bias=True)
)
(proj_2): Linear(in_features=256, out_features=256, bias=True)
(proj_3): Linear(in_features=256, out_features=256, bias=True)
) has 1 layers
Trainable params num: 9.27 M
Total paramerters: 9.27 M
Traceback (most recent call last):
File "tiny_train.py", line 463, in
train(opt, log)
File "tiny_train.py", line 276, in train
learner.incremental_train(taski, opt.character, train_loader, valid_loader)
File "D:\text_recgonition_code\MRN-main\il_modules\mrn.py", line 165, in incremental_train
self._train(0, taski, train_loader, valid_loader,step=0)
File "D:\text_recgonition_code\MRN-main\il_modules\mrn.py", line 190, in _train
self.model.load_state_dict(torch.load(f"{saved_best_model}"), strict=True)
File "C:\ProgramData\anaconda3\envs\mmocr\lib\site-packages\torch\serialization.py", line 699, in load
with _open_file_like(f, 'rb') as opened_file:
File "C:\ProgramData\anaconda3\envs\mmocr\lib\site-packages\torch\serialization.py", line 230, in _open_file_like
return _open_file(name_or_buffer, mode)
File "C:\ProgramData\anaconda3\envs\mmocr\lib\site-packages\torch\serialization.py", line 211, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: './saved_models/CRNN_MRN/Chinese_0_0_best_score.pth'