Delete a needless duplicate condition (#9826)

Co-authored-by: Tomohide Shibata <tomshiba@yahoo-corp.jp>
This commit is contained in:
tomohideshibata 2021-01-27 19:15:23 +09:00 committed by GitHub
parent a1720694a5
commit f0329ea516
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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__(