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
3951c2c1
Unverified
Commit
3951c2c1
authored
Nov 28, 2018
by
Thomas Wolf
Committed by
GitHub
Nov 28, 2018
Browse files
Merge pull request #60 from davidefiocco/patch-1
Updated quick-start example with `BertForMaskedLM`
parents
21f01964
ec2c339b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
README.md
README.md
+1
-1
No files found.
README.md
View file @
3951c2c1
...
...
@@ -142,7 +142,7 @@ predictions = model(tokens_tensor, segments_tensors)
# confirm we were able to predict 'henson'
predicted_index
=
torch
.
argmax
(
predictions
[
0
,
masked_index
]).
item
()
predicted_token
=
tokenizer
.
convert_ids_to_tokens
([
predicted_index
])
predicted_token
=
tokenizer
.
convert_ids_to_tokens
([
predicted_index
])
[
0
]
assert
predicted_token
==
'henson'
```
...
...
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