Unverified Commit f0329ea5 authored by tomohideshibata's avatar tomohideshibata Committed by GitHub
Browse files

Delete a needless duplicate condition (#9826)


Co-authored-by: default avatarTomohide Shibata <tomshiba@yahoo-corp.jp>
parent a1720694
...@@ -439,8 +439,6 @@ class HammingDiversityLogitsProcessor(LogitsProcessor): ...@@ -439,8 +439,6 @@ class HammingDiversityLogitsProcessor(LogitsProcessor):
raise ValueError("`num_beam_groups` should be an integer strictly larger than 1.") raise ValueError("`num_beam_groups` should be an integer strictly larger than 1.")
if num_beam_groups > num_beams: if num_beam_groups > num_beams:
raise ValueError("`beam_groups` has to be smaller or equal to `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 self._num_sub_beams = num_beams // num_beam_groups
def __call__( def __call__(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment