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
4658896e
Unverified
Commit
4658896e
authored
May 11, 2020
by
Sam Shleifer
Committed by
GitHub
May 11, 2020
Browse files
[Marian] Fix typo in docstring (#4284)
parent
bf64b8cf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/modeling_marian.py
src/transformers/modeling_marian.py
+1
-1
No files found.
src/transformers/modeling_marian.py
View file @
4658896e
...
...
@@ -37,7 +37,7 @@ class MarianMTModel(BartForConditionalGeneration):
tok = MarianTokenizer.from_pretrained(mname)
batch = tok.prepare_translation_batch(src_texts=[sample_text]) # don't need tgt_text for inference
gen = model.generate(**batch) # for forward pass: model(**batch)
words: List[str] = tok.decode
_batch
(gen, skip_special_tokens=True) # returns "Where is the the bus stop ?"
words: List[str] = tok.
batch_
decode(gen, skip_special_tokens=True) # returns "Where is the the bus stop ?"
"""
...
...
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