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
4f90fc1d
Unverified
Commit
4f90fc1d
authored
Nov 01, 2022
by
Wang Ran (汪然)
Committed by
GitHub
Nov 01, 2022
Browse files
typo (#20001)
parent
c87ae86a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/encoder_decoder/modeling_encoder_decoder.py
...ormers/models/encoder_decoder/modeling_encoder_decoder.py
+1
-1
No files found.
src/transformers/models/encoder_decoder/modeling_encoder_decoder.py
View file @
4f90fc1d
...
@@ -568,7 +568,7 @@ class EncoderDecoderModel(PreTrainedModel):
...
@@ -568,7 +568,7 @@ class EncoderDecoderModel(PreTrainedModel):
>>> input_ids = tokenizer("This is a really long text", return_tensors="pt").input_ids
>>> input_ids = tokenizer("This is a really long text", return_tensors="pt").input_ids
>>> labels = tokenizer("This is the corresponding summary", return_tensors="pt").input_ids
>>> labels = tokenizer("This is the corresponding summary", return_tensors="pt").input_ids
>>> outputs = model(input_ids=input_ids, labels=
input_id
s)
>>> outputs = model(input_ids=input_ids, labels=
label
s)
>>> loss, logits = outputs.loss, outputs.logits
>>> loss, logits = outputs.loss, outputs.logits
>>> # save and load from pretrained
>>> # save and load from pretrained
...
...
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