Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/information_extraction/DuEE/sequence_labeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import paddle.nn.functional as F
from paddlenlp.data import Stack, Tuple, Pad
from paddlenlp.transformers import LinearDecayWithWarmup
from paddlenlp.transformers import AutoModelTokenClassification, AutoTokenizer
from paddlenlp.transformers import AutoModelForTokenClassification, AutoTokenizer
from paddlenlp.metrics import ChunkEvaluator
from utils import read_by_lines, write_by_lines, load_dict

Expand Down
2 changes: 1 addition & 1 deletion tests/ernie_information_extraction/export_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# The number of labels should be in accordance with the training dataset.
label_vocab = load_dict(os.path.join(args.data_dir, 'tag.dic'))

model = AutoModelTokenClassification.from_pretrained(
model = AutoModelForTokenClassification.from_pretrained(
"ernie-3.0-medium-zh", num_classes=len(label_vocab))

if args.params_path and os.path.isfile(args.params_path):
Expand Down