shibing624 / pycorrector

pycorrector is a toolkit for text error correction. 文本纠错,实现了Kenlm,T5,MacBERT,ChatGLM3,Qwen2.5等模型应用在纠错场景,开箱即用。
https://www.mulanai.com/product/corrector/
Apache License 2.0
5.61k stars 1.1k forks source link

macbert模型中的损失函数是什么呢? #254

Closed dongteng closed 2 years ago

dongteng commented 2 years ago

Describe the Question

Please provide a clear and concise description of what the question is.

Describe your attempts

You may also provide a Minimal, Complete, and Verifiable example you tried as a workaround, or StackOverflow solution that you have walked through. (e.g. cosmic radiation).

In addition, figure out your version by running import pycorrector; pycorrector.__version__.

shibing624 commented 2 years ago

https://github.com/shibing624/pycorrector/blob/master/pycorrector/macbert/macbert4csc.py#L39 det_loss + a * cor_loss

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.(由于长期不活动,机器人自动关闭此问题,如果需要欢迎提问)