tiny ppl doc typo fix (#5751)

This commit is contained in:
Joe Davison 2020-07-14 10:39:44 -06:00 committed by GitHub
parent ac921f0385
commit 5d178954c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,7 +123,7 @@ are 512 preceding tokens available to condition on).
stride = 512
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)
end_loc = i + stride
input_ids = encodings.input_ids[:,begin_loc:end_loc].to(device)