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 cc8fe2f9d1476c470da85c2ae5423bad765a880e..2c351b830f0b971c618cfabed93ce751c9afbc04 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 7827bf32f7a46c5c399f0a9603e6c684cc881718..1778ebe67101c38fc7ee9c659e0a5b93f501f0ca 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, ) ```