LeeSureman / Batch_Parallel_LatticeLSTM

Chinese NER using Lattice LSTM. Reproduction for ACL 2018 paper.
130 stars 16 forks source link

F1值 #7

Open zhangtianlin opened 4 years ago

zhangtianlin commented 4 years ago

您好,我用的weibo数据跑,结果最大是56,没有达到您说的58,我能看下您的一些参数设置log么。谢谢 我的一些参数如下: device cuda:0 debug False norm_embed False batch 1 test_batch 1024 optim sgd lr 0.045 model lattice skip_before_head False hidden 113 momentum 0 bi True dataset weibo use_bigram True embed_dropout 0.5 gaz_dropout -1 output_dropout 0.5 epoch 100 seed 100 train train test:270 train:1350 dev:270 label_vocab:17 {0: 'O', 1: 'I-PER.NOM', 2: 'I-PER.NAM', 3: 'B-PER.NOM', 4: 'B-PER.NAM', 5: 'I-ORG.NAM', 6: 'I-GPE.NAM', 7: 'B-GPE.NAM', 8: 'B-ORG.NAM', 9: 'I-LOC.NAM', 10: 'I-LOC.NOM', 11: 'I-ORG.NOM', 12: 'B-LOC.NAM', 13: 'B-LOC.NOM', 14: 'B-ORG.NOM', 15: 'B-GPE.NOM', 16: 'I-GPE.NOM'} Found 3294 out of 3391 words in the pre-training embedding. Found 35471 out of 42889 words in the pre-training embedding. Save cache to cache/weiboner. Save cache to cache/load_yangjie_rich_pretrain_word_list. Found 698668 out of 698670 words in the pre-training embedding. Save cache to cache/weibo_lattice. +------------+------------+-------------+---------+---------------+----------------+----------------------+--------------------+----------------------+--------------------+-------------------+------------------------+ | chars | target | bigrams | seq_len | skips_l2r | skips_r2l | skips_l2r_source | skips_l2r_word | skips_r2l_source | skips_r2l_word | lexicon_count | lexicon_count_back | +------------+------------+-------------+---------+---------------+----------------+----------------------+--------------------+----------------------+--------------------+-------------------+------------------------+ | [787, 1... | [0, 0, ... | [2578, 1... | 26 | [[], [[0, ... | [[[1, '科技... | [[], [0], [], [2]... | [[], [143], [],... | [[1], [], [3, 4],... | [[143], [], [32... | [0, 1, 0, 1, 2... | [1, 0, 2, 1, 0, 1, ... | +------------+------------+-------------+---------+---------------+----------------+----------------------+--------------------+----------------------+--------------------+-------------------+------------------------+ vocab info: char:3391 label:17 bigram:42889 word:698670

TianlinZhang668 commented 4 years ago

同求

LeeSureman commented 4 years ago

gaz dropout 改0.1试试

zhangtianlin commented 4 years ago

确实改了,上面的只是先打印出来的,您在后面有个判断,如果是weibo,则dropout都是0.1,确实是这么用的,您还用了什么不同的参数么,hidden怎么是113

zhangtianlin commented 4 years ago

dev是56,test更低,只有52点多,调了几次了,一直调不好。楼主您如果有时间提供个log

LeeSureman commented 4 years ago

你看看你的微博是bio还是bmeso

LeeSureman commented 4 years ago

我当时跑出来就是test是58

zhangtianlin commented 4 years ago

是bio,楼主使用的bmes么

LeeSureman commented 4 years ago

我当时用的bio啊。。你换几个种子跑下呗。。

LeeSureman commented 4 years ago

我特地针对weibo设置了encoding type

LeeSureman commented 4 years ago

好像现在代码里gaz_dropout没用上啊

TianlinZhang668 commented 4 years ago

好像是的,我刚才看确实没用上,我对代码理解还没到那一步,楼主有空改改呗

LeeSureman commented 4 years ago

你就把forward里给词的embed_dropout改成gaz_dropout?

TianlinZhang668 commented 4 years ago

还是好难跑到58,dev集能到58,测试及只有52。楼主是不是dev集跑到了58

LeeSureman commented 4 years ago

明天我再跑一下

LeeSureman commented 4 years ago

应该就是test到了58,我这个模型的运算和原版是一样的,我用一模一样的初始化值检查过中间的计算过程

TianlinZhang668 commented 4 years ago

万分感谢,调了一天参数了

LeeSureman commented 4 years ago

之前发烧了,我前天跑了下之前的代码,的确是到不了报告的结果

LeeSureman commented 4 years ago

你先试试跑ontonotes吧

TianlinZhang668 commented 4 years ago

好的,老哥注意身体啊