PaddlePaddle / PaddleOCR

Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
https://paddlepaddle.github.io/PaddleOCR/
Apache License 2.0
44.48k stars 7.84k forks source link

怎么设置FC层的维度 #8514

Closed ronaldpan closed 1 year ago

ronaldpan commented 1 year ago

使用了自定义的dict,发现fc层的维度与词典不对应。请问怎么设置FC层的维度?

huangjun12 commented 1 year ago

修改一下对应yml文件中模型的fc层参数

ronaldpan commented 1 year ago

Architecture: model_type: rec algorithm: CRNN Transform: Backbone: name: MobileNetV3 scale: 0.5 model_name: small small_stride: [1, 2, 2, 2] Neck: name: SequenceEncoder encoder_type: rnn hidden_size: 48 Head: name: CTCHead fc_decay: 0.00001 请问应该修改哪个参数?

huangjun12 commented 1 year ago

https://github.com/PaddlePaddle/PaddleOCR/blob/18ddb6d5f9bdc2c1b0aa7f6e399ec0f76119dc87/ppocr/modeling/heads/rec_ctc_head.py#L38 这里