Delete a needless duplicate condition (#9826)
Co-authored-by: Tomohide Shibata <tomshiba@yahoo-corp.jp>
This commit is contained in:
@@ -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__(
|
||||||
|
|||||||
Reference in New Issue
Block a user