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
1cb9c76e
Unverified
Commit
1cb9c76e
authored
Feb 18, 2019
by
sam-qordoba
Committed by
GitHub
Feb 18, 2019
Browse files
Fix typo in `GPT2Model` code sample
Typo prevented code from running
parent
a25d056b
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 @
1cb9c76e
...
...
@@ -428,7 +428,7 @@ with torch.no_grad():
hidden_states_1, past = model(tokens_tensor_1)
# past can be used to reuse precomputed hidden state in a subsequent predictions
# (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
`
...
...
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