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
76cadb79
Unverified
Commit
76cadb79
authored
Aug 09, 2021
by
SaulLu
Committed by
GitHub
Aug 09, 2021
Browse files
replace tgt_lang by tgt_text (#13061)
parent
a8bf2fa7
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/m2m_100.rst
docs/source/model_doc/m2m_100.rst
+1
-1
No files found.
docs/source/model_doc/m2m_100.rst
View file @
76cadb79
...
...
@@ -58,7 +58,7 @@ examples. To install :obj:`sentencepiece` run ``pip install sentencepiece``.
tokenizer
=
M2M100Tokenizer
.
from_pretrained
(
'facebook/m2m100_418M'
,
src_lang
=
"en"
,
tgt_lang
=
"fr"
)
src_text
=
"Life is like a box of chocolates."
tgt_
lang
=
"La vie est comme une boîte de chocolat."
tgt_
text
=
"La vie est comme une boîte de chocolat."
model_inputs
=
tokenizer
(
src_text
,
return_tensors
=
"pt"
)
with
tokenizer
.
as_target_tokenizer
():
...
...
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