Replace // operator with / operator + long() (#13013)

This commit is contained in:
Nils Reimers 2021-08-05 15:55:14 +02:00 committed by GitHub
parent a6d62aaba0
commit 33929448a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1835,7 +1835,7 @@ class GenerationMixin:
next_token_scores, 2 * num_beams, dim=1, largest=True, sorted=True
)
next_indices = next_tokens // vocab_size
next_indices = (next_tokens / vocab_size).long()
next_tokens = next_tokens % vocab_size
# stateless