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
971e3666
Unverified
Commit
971e3666
authored
Dec 13, 2021
by
Josué Nascimento
Committed by
GitHub
Dec 13, 2021
Browse files
Change how to load config of XLNetLMHeadModel (#14746)
parent
15a9d015
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/pytorch/language-modeling/run_plm.py
examples/pytorch/language-modeling/run_plm.py
+1
-1
No files found.
examples/pytorch/language-modeling/run_plm.py
View file @
971e3666
...
@@ -348,7 +348,7 @@ def main():
...
@@ -348,7 +348,7 @@ def main():
)
)
else
:
else
:
logger
.
info
(
"Training new model from scratch"
)
logger
.
info
(
"Training new model from scratch"
)
model
=
XLNetLMHeadModel
.
from_config
(
config
)
model
=
XLNetLMHeadModel
(
config
)
model
.
resize_token_embeddings
(
len
(
tokenizer
))
model
.
resize_token_embeddings
(
len
(
tokenizer
))
...
...
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