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
2f1c745c
Commit
2f1c745c
authored
Dec 17, 2019
by
thomwolf
Browse files
update conversion script
parent
83bc5235
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
transformers/convert_xlm_roberta_original_pytorch_checkpoint_to_pytorch.py
...ert_xlm_roberta_original_pytorch_checkpoint_to_pytorch.py
+1
-1
No files found.
transformers/convert_xlm_roberta_original_pytorch_checkpoint_to_pytorch.py
View file @
2f1c745c
...
...
@@ -47,7 +47,7 @@ def convert_roberta_checkpoint_to_pytorch(roberta_checkpoint_path, pytorch_dump_
roberta
=
FairseqRobertaModel
.
from_pretrained
(
roberta_checkpoint_path
,
bpe
=
'sentencepiece'
)
roberta
.
eval
()
# disable dropout
config
=
BertConfig
(
vocab_size
_or_config_json_file
=
250002
,
vocab_size
=
250002
,
hidden_size
=
roberta
.
args
.
encoder_embed_dim
,
num_hidden_layers
=
roberta
.
args
.
encoder_layers
,
num_attention_heads
=
roberta
.
args
.
encoder_attention_heads
,
...
...
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