Closed Abdulazizbek closed 5 years ago
Thank you
I'm running with united
mode
only with icdar2015 dataset. But is still giving key
issue while I changed some at utils/common_str.py
.
@Abdulazizbek can you provide your error detail?
)
Traceback (most recent call last):
File "train.py", line 102, in <module>
main(config, args.resume)
File "train.py", line 66, in main
keys=getattr(common_str,config['model']['keys']))
File "/home/nplab/Alex/OCR/FOTS/trainer/trainer.py", line 23, in __init__
super(Trainer, self).__init__(model, loss, metrics, finetune, resume, config, train_logger)
File "/home/nplab/Alex/OCR/FOTS/base/base_trainer.py", line 43, in __init__
self.model.to(self.device)
File "/home/nplab/Alex/OCR/FOTS/model/model.py", line 61, in to
setattr(self, m_model, getattr(self, m_model).to(device))
File "/home/nplab/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 381, in to
return self._apply(convert)
File "/home/nplab/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 187, in _apply
module._apply(fn)
File "/home/nplab/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 187, in _apply
module._apply(fn)
File "/home/nplab/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 193, in _apply
param.data = fn(param.data)
File "/home/nplab/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 379, in convert
return t.to(device, dtype if t.is_floating_point() else None, non_blocking)
@Abdulazizbek i'd like to say,this problem not caused by keys
,this error caused by the device....i don't know is there any cuda gpu in your machine.pls notice the cuda
and gpus
in the configuration and validate.
@novioleo sorry for your inconvience... i wrote the mean of
keys
in readme but in chinese.keys
means the characters in crnn predict,defined in utils/common_str.py,you can choose your own keys,or use the persisted keys.