src/transformers/generation/tf_logits_process.py/TFMinLengthLogitsProcessor/_apply_eos_token_mask
class TFMinLengthLogitsProcessor:    def _apply_eos_token_mask(self, scores: tf.Tensor) -> tf.Tensor:
        eos_token_id_mask = tf.range(scores.shape[-1]) == self.eos_token_id
        scores = tf.where(eos_token_id_mask, float("-inf"), scores)
        return scores