Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
f0fc0aea
Unverified
Commit
f0fc0aea
authored
Sep 08, 2020
by
Sam Shleifer
Committed by
GitHub
Sep 08, 2020
Browse files
pegasus.rst: fix expected output (#7017)
parent
120176ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
docs/source/model_doc/pegasus.rst
docs/source/model_doc/pegasus.rst
+1
-1
No files found.
docs/source/model_doc/pegasus.rst
View file @
f0fc0aea
...
...
@@ -60,7 +60,7 @@ Usage Example
batch = tokenizer.prepare_seq2seq_batch(src_text, truncation=True, padding='
longest
').to(torch_device)
translated = model.generate(**batch)
tgt_text = tokenizer.batch_decode(translated, skip_special_tokens=True)
assert tgt_text[0] == "California'
s
largest
electricity
provider
has
turned
off
power
to
ten
s
of
thousands
of
customers
.
"
assert tgt_text[0] == "California'
s
largest
electricity
provider
has
turned
off
power
to
hundred
s
of
thousands
of
customers
.
"
PegasusForConditionalGeneration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
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