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
07ebe0fd
Unverified
Commit
07ebe0fd
authored
Feb 18, 2019
by
Thomas Wolf
Committed by
GitHub
Feb 18, 2019
Browse files
Merge pull request #292 from sam-qordoba/patch-3
Fix typo in `GPT2Model` code sample
parents
a25d056b
1cb9c76e
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 @
07ebe0fd
...
@@ -428,7 +428,7 @@ with torch.no_grad():
...
@@ -428,7 +428,7 @@ with torch.no_grad():
hidden_states_1, past = model(tokens_tensor_1)
hidden_states_1, past = model(tokens_tensor_1)
# past can be used to reuse precomputed hidden state in a subsequent predictions
# past can be used to reuse precomputed hidden state in a subsequent predictions
# (see beam-search examples in the run_gpt2.py example
# (see beam-search examples in the run_gpt2.py example
hidden_states
-
2, past = model(tokens_tensor_2, past=past)
hidden_states
_
2, past = model(tokens_tensor_2, past=past)
```
```
And how to use `
GPT2LMHeadModel
`
And how to use `
GPT2LMHeadModel
`
...
...
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