ljynlp / W2NER

Source code for AAAI 2022 paper: Unified Named Entity Recognition as Word-Word Relation Classification
MIT License
506 stars 82 forks source link

在cpu上进行训练模型时,entity的precision,recall和F1 都是0 #97

Open zhouxiaofang opened 1 year ago

zhouxiaofang commented 1 year ago

校友您好,能帮忙看下源码适配CPU运行吗?

2023-05-26 01:39:08 - INFO: dict_items([('dataset', 'resume-zh'), ('dist_emb_size', 20), ('type_emb_size', 20), ('lstm_hid_size', 512), ('conv_hid_size', 96), ('bert_hid_size', 768), ('biaffine_size', 512), ('ffnn_hid_size', 288), ('dilation', [1, 2, 3]), ('emb_dropout', 0.5), ('conv_dropout', 0.5), ('out_dropout', 0.33), ('epochs', 10), ('batch_size', 16), ('learning_rate', 0.001), ('weight_decay', 0), ('clip_grad_norm', 5.0), ('bert_name', 'bert-base-chinese'), ('bert_learning_rate', 5e-06), ('warm_factor', 0.1), ('use_bert_last_4_layers', False), ('seed', 123), ('config', 'config/resume-zh.json'), ('device', 'cpu'), ('fp16', False), ('use_precision_alignment', False)]) 2023-05-26 01:39:08 - INFO: Loading Data 2023-05-26 01:39:08 - INFO: +-----------+-----------+----------+ | resume-zh | sentences | entities | +-----------+-----------+----------+ | train | 3819 | 13438 | | dev | 463 | 1497 | | test | 477 | 1630 | +-----------+-----------+----------+ 2023-05-26 01:39:26 - INFO: Building Model Some weights of the model checkpoint at bert-base-chinese were not used when initializing BertModel: ['cls.predictions.transform.LayerNorm.bias', 'cls.predictions.transform.dense.bias', 'cls.predictions.decoder.weight', 'cls.seq_relationship.bias', 'cls.predictions.bias', 'cls.seq_relationship.weight', 'cls.predictions.transform.LayerNorm.weight', 'cls.predictions.transform.dense.weight']

fanjiaxin23 commented 1 year ago

@zhouxiaofang 你能修好它吗?我有同样的问题,知道如何解决吗?