Skip to content

Commit 8c1477f

Browse files
committed
update comments of text classificaiton
1 parent ce7c267 commit 8c1477f

File tree

1 file changed

+2
-2
lines changed
  • examples/text_classification/pretrained_models

1 file changed

+2
-2
lines changed

examples/text_classification/pretrained_models/train.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ def do_train():
113113
train_ds, dev_ds = load_dataset("chnsenticorp", splits=["train", "dev"])
114114

115115
# If you wanna use bert/roberta/electra pretrained model,
116-
# model = ppnlp.transformers.BertForSequenceClassification.from_pretrained('bert-base-chinese', num_class=2)
117-
# model = ppnlp.transformers.RobertaForSequenceClassification.from_pretrained('roberta-wwm-ext', num_class=2)
116+
# model = ppnlp.transformers.BertForSequenceClassification.from_pretrained('bert-base-chinese', num_classes=2)
117+
# model = ppnlp.transformers.RobertaForSequenceClassification.from_pretrained('roberta-wwm-ext', num_classes=2)
118118
# model = ppnlp.transformers.ElectraForSequenceClassification.from_pretrained('chinese-electra-small', num_classes=2)
119119
model = ppnlp.transformers.ErnieForSequenceClassification.from_pretrained(
120120
'ernie-tiny', num_classes=len(train_ds.label_list))

0 commit comments

Comments
 (0)