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
624a5644
Commit
624a5644
authored
Oct 17, 2019
by
Rémi Louf
Browse files
revert black formatting to conform with lib style
parent
9b71fc9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
transformers/modeling_seq2seq.py
transformers/modeling_seq2seq.py
+2
-8
No files found.
transformers/modeling_seq2seq.py
View file @
624a5644
...
...
@@ -43,13 +43,7 @@ class PreTrainedSeq2seq(PreTrainedModel):
self
.
decoder
=
decoder
@
classmethod
def
from_pretrained
(
cls
,
encoder_pretrained_model_name_or_path
,
decoder_pretrained_model_name_or_path
,
*
model_args
,
**
kwargs
):
def
from_pretrained
(
cls
,
encoder_pretrained_model_name_or_path
,
decoder_pretrained_model_name_or_path
,
*
model_args
,
**
kwargs
):
r
""" Instantiates an encoder and a decoder from one or two base classes
of the library from pre-trained model checkpoints.
...
...
@@ -190,7 +184,7 @@ class Model2Model(PreTrainedSeq2seq):
def
tie_weights
(
self
):
""" Tying the encoder and decoders' embeddings together.
We need for each to get down to the embedding weights. However the
We need for each to get down to the embedding weights. However the
different model classes are inconsistent to that respect:
- BertModel: embeddings.word_embeddings
- RoBERTa: embeddings.word_embeddings
...
...
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