From 01c032d5f75936d5c4901318c0589d1db370c77a Mon Sep 17 00:00:00 2001 From: linjieccc <623543001@qq.com> Date: Fri, 6 Aug 2021 11:17:11 +0800 Subject: [PATCH] update readme --- modules/text/language_model/chinese_bert_wwm_ext/module.py | 2 +- modules/text/language_model/chinese_electra_base/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/text/language_model/chinese_bert_wwm_ext/module.py b/modules/text/language_model/chinese_bert_wwm_ext/module.py index cc8fe2f9..2c351b83 100644 --- a/modules/text/language_model/chinese_bert_wwm_ext/module.py +++ b/modules/text/language_model/chinese_bert_wwm_ext/module.py @@ -71,7 +71,7 @@ class BertWwm(nn.Layer): self.model = BertForTokenClassification.from_pretrained( pretrained_model_name_or_path='bert-wwm-ext-chinese', num_classes=self.num_classes, **kwargs) self.criterion = paddle.nn.loss.CrossEntropyLoss() - self.metric = ChunkEvaluator(label_list=[self.label_map[i] for i in sorted(self.label_map.keys())], suffix) + self.metric = ChunkEvaluator(label_list=[self.label_map[i] for i in sorted(self.label_map.keys())], suffix=suffix) elif task == 'text-matching': self.model = BertModel.from_pretrained(pretrained_model_name_or_path='bert-wwm-ext-chinese', **kwargs) self.dropout = paddle.nn.Dropout(0.1) diff --git a/modules/text/language_model/chinese_electra_base/README.md b/modules/text/language_model/chinese_electra_base/README.md index 7827bf32..1778ebe6 100644 --- a/modules/text/language_model/chinese_electra_base/README.md +++ b/modules/text/language_model/chinese_electra_base/README.md @@ -15,8 +15,8 @@ def __init__( load_checkpoint=None, label_map=None, num_classes=2, - suffix=False, - **kwargs, + suffix=False, + **kwargs, ) ``` -- GitLab