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
49cba6e5
Commit
49cba6e5
authored
Oct 14, 2019
by
Louis MARTIN
Browse files
Fix import error in script to convert faisreq roberta checkpoints
parent
a701c9b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
transformers/convert_roberta_original_pytorch_checkpoint_to_pytorch.py
...convert_roberta_original_pytorch_checkpoint_to_pytorch.py
+9
-9
No files found.
transformers/convert_roberta_original_pytorch_checkpoint_to_pytorch.py
View file @
49cba6e5
...
@@ -23,15 +23,15 @@ import torch
...
@@ -23,15 +23,15 @@ import torch
from
fairseq.models.roberta
import
RobertaModel
as
FairseqRobertaModel
from
fairseq.models.roberta
import
RobertaModel
as
FairseqRobertaModel
from
fairseq.modules
import
TransformerSentenceEncoderLayer
from
fairseq.modules
import
TransformerSentenceEncoderLayer
from
transformers
import
(
BertConfig
,
BertEncoder
,
from
transformers
.modeling_bert
import
(
BertConfig
,
BertEncoder
,
BertIntermediate
,
BertLayer
,
BertIntermediate
,
BertLayer
,
BertModel
,
BertOutput
,
BertModel
,
BertOutput
,
BertSelfAttention
,
BertSelfAttention
,
BertSelfOutput
)
BertSelfOutput
)
from
transformers
import
(
RobertaEmbeddings
,
from
transformers
.modeling_roberta
import
(
RobertaEmbeddings
,
RobertaForMaskedLM
,
RobertaForMaskedLM
,
RobertaForSequenceClassification
,
RobertaForSequenceClassification
,
RobertaModel
)
RobertaModel
)
logging
.
basicConfig
(
level
=
logging
.
INFO
)
logging
.
basicConfig
(
level
=
logging
.
INFO
)
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
...
...
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