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
3015d12b
Unverified
Commit
3015d12b
authored
Mar 29, 2022
by
Wesley A. Cheng
Committed by
GitHub
Mar 29, 2022
Browse files
fix wrong variable name (#16467)
parent
b62ac4d2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
docs/source/preprocessing.mdx
docs/source/preprocessing.mdx
+2
-2
No files found.
docs/source/preprocessing.mdx
View file @
3015d12b
...
...
@@ -175,7 +175,7 @@ Set the `return_tensors` parameter to either `pt` for PyTorch, or `tf` for Tenso
... "Don't think he knows about second breakfast, Pip.",
... "What about elevensies?",
... ]
>>> encoded_input = tokenizer(batch, padding=True, truncation=True, return_tensors="tf")
>>> encoded_input = tokenizer(batch
_sentences
, padding=True, truncation=True, return_tensors="tf")
>>> print(encoded_input)
{'input_ids': <tf.Tensor: shape=(2, 9), dtype=int32, numpy=
array([[ 101, 153, 7719, 21490, 1122, 1114, 9582, 1623, 102],
...
...
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