chineseocr / trocr-chinese

transformers ocr for chinese
339 stars 53 forks source link

vocab.txt #1

Open lyc728 opened 2 years ago

lyc728 commented 2 years ago

你好,我想请问下cust-data/vocab.txt,这个字典在训练中有对应吗?我加载了你放好的预训练模型能直接训练,而这个字典是否起到作用了呢?

wenyinlong commented 2 years ago
python init_custdata_model.py \   
    --cust_vocab ./cust-data/vocab.txt \  
    --pretrain_model ./weights \
    --cust_data_init_weights_path ./cust-data/weights

执行这个,就会生成自己训练集下字符集预训练初始权重。如果直接用内置的模型,就会用预训练模型的字符集

lyc728 commented 2 years ago

你好,我这里训练得到的验证集精度为啥一直是0呢?

企业微信截图_16496484113052
wenlihaoyu commented 2 years ago

你好,我这里训练得到的验证集精度为啥一直是0呢?

更新一下代码即可