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
f0329ea5
Unverified
Commit
f0329ea5
authored
Jan 27, 2021
by
tomohideshibata
Committed by
GitHub
Jan 27, 2021
Browse files
Delete a needless duplicate condition (#9826)
Co-authored-by:
Tomohide Shibata
<
tomshiba@yahoo-corp.jp
>
parent
a1720694
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
2 deletions
+0
-2
src/transformers/generation_logits_process.py
src/transformers/generation_logits_process.py
+0
-2
No files found.
src/transformers/generation_logits_process.py
View file @
f0329ea5
...
...
@@ -439,8 +439,6 @@ class HammingDiversityLogitsProcessor(LogitsProcessor):
raise
ValueError
(
"`num_beam_groups` should be an integer strictly larger than 1."
)
if
num_beam_groups
>
num_beams
:
raise
ValueError
(
"`beam_groups` has to be smaller or equal to `num_beams`."
)
if
num_beam_groups
>
num_beams
:
raise
ValueError
(
"`beam_groups` has to be smaller or equal to `num_beams`"
)
self
.
_num_sub_beams
=
num_beams
//
num_beam_groups
def
__call__
(
...
...
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