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
5d178954
Unverified
Commit
5d178954
authored
Jul 14, 2020
by
Joe Davison
Committed by
GitHub
Jul 14, 2020
Browse files
tiny ppl doc typo fix (#5751)
parent
ac921f03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
docs/source/perplexity.rst
docs/source/perplexity.rst
+1
-1
No files found.
docs/source/perplexity.rst
View file @
5d178954
...
@@ -123,7 +123,7 @@ are 512 preceding tokens available to condition on).
...
@@ -123,7 +123,7 @@ are 512 preceding tokens available to condition on).
stride = 512
stride = 512
lls = []
lls = []
for i in tqdm(range(
1
, encodings.input_ids.size(1), stride)):
for i in tqdm(range(
0
, encodings.input_ids.size(1), stride)):
begin_loc = max(i + stride - max_length, 0)
begin_loc = max(i + stride - max_length, 0)
end_loc = i + stride
end_loc = i + stride
input_ids = encodings.input_ids[:,begin_loc:end_loc].to(device)
input_ids = encodings.input_ids[:,begin_loc:end_loc].to(device)
...
...
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