acphile / MCCWS

A Pytorch implementation for "A Concise Model for Multi-Criteria Chinese Word Segmentation with Transformer Encoder"
17 stars 7 forks source link

没有预训练bigram_embedding情况时报错 #5

Open shengwenyuan opened 2 years ago

shengwenyuan commented 2 years ago

main.py的332行附近代码有误,按位置传参时在实现bi1=batch_y["tags"],应该改为 else: out = model(batch_x["task"],batch_x["uni"],batch_x["seq_len"],tags=batch_y["tags"]) 另外提供预训练embedding参考链接 https://ai.tencent.com/ailab/nlp/zh/embedding.html


There is a piece of wrong code at line 332 in main.py. When removing two parameters bi1 and bi2, tags is delivered incorrectly.

acphile commented 2 years ago

Thank you for pointing out!