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
97b787fb
Unverified
Commit
97b787fb
authored
Jan 19, 2021
by
Sylvain Gugger
Committed by
GitHub
Jan 19, 2021
Browse files
Fix old Seq2SeqTrainer (#9675)
parent
d302d88b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/seq2seq/seq2seq_trainer.py
examples/seq2seq/seq2seq_trainer.py
+1
-1
No files found.
examples/seq2seq/seq2seq_trainer.py
View file @
97b787fb
...
@@ -60,7 +60,7 @@ class Seq2SeqTrainer(Trainer):
...
@@ -60,7 +60,7 @@ class Seq2SeqTrainer(Trainer):
assert
isinstance
(
assert
isinstance
(
self
.
model
,
PreTrainedModel
self
.
model
,
PreTrainedModel
),
f
"If no `config` is passed the model to be trained has to be of type `PreTrainedModel`, but is
{
self
.
model
.
__class__
}
"
),
f
"If no `config` is passed the model to be trained has to be of type `PreTrainedModel`, but is
{
self
.
model
.
__class__
}
"
self
.
config
=
self
.
_actual_model
(
self
.
model
)
.
config
self
.
config
=
self
.
model
.
config
else
:
else
:
self
.
config
=
config
self
.
config
=
config
...
...
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