Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
82a2b76c
"vscode:/vscode.git/clone" did not exist on "3cff4cc58730409c68f8afa2f3b9c61efa0e85c6"
Unverified
Commit
82a2b76c
authored
Jun 09, 2021
by
Koichi Yasuoka
Committed by
GitHub
Jun 09, 2021
Browse files
Update run_ner.py with id2label config (#12001)
parent
0e82f0cb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
examples/pytorch/token-classification/run_ner.py
examples/pytorch/token-classification/run_ner.py
+2
-0
No files found.
examples/pytorch/token-classification/run_ner.py
View file @
82a2b76c
...
...
@@ -281,6 +281,8 @@ def main():
config
=
AutoConfig
.
from_pretrained
(
model_args
.
config_name
if
model_args
.
config_name
else
model_args
.
model_name_or_path
,
num_labels
=
num_labels
,
label2id
=
label_to_id
,
id2label
=
{
i
:
l
for
l
,
i
in
label_to_id
.
items
()},
finetuning_task
=
data_args
.
task_name
,
cache_dir
=
model_args
.
cache_dir
,
revision
=
model_args
.
model_revision
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment