Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
33929448
Unverified
Commit
33929448
authored
Aug 05, 2021
by
Nils Reimers
Committed by
GitHub
Aug 05, 2021
Browse files
Replace // operator with / operator + long() (#13013)
parent
a6d62aab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/generation_utils.py
src/transformers/generation_utils.py
+1
-1
No files found.
src/transformers/generation_utils.py
View file @
33929448
...
...
@@ -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
...
...
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