class_docstr: [`TFLogitsProcessor`] enforcing an exponential penalty on repeated sequences.
  
  Args:
      repetition_penalty (`float`):
          The parameter for repetition penalty. 1.0 means no penalty. See [this
          paper](https://arxiv.org/pdf/1909.05858.pdf) for more details.
class_docstr_tok: ["[","`","TFLogitsProcessor","`","]","enforcing","an","exponential","penalty","on","repeated","sequences",".","Args",":","repetition_penalty","(","`","float","`",")",":","The","parameter","for","repetition","penalty",".","1.0","means","no","penalty",".","See","[","this","paper","]","(","https",":","\/\/arxiv.org\/pdf\/1909.05858.pdf",")","for","more","details","."]
code: def __init__(self, penalty: float):
      if not isinstance(penalty, float) or not (penalty > 0):
          raise ValueError(
              f"`penalty` has to be a strictly positive float, but is {penalty}"
          )
  
      self.penalty = penalty
  
imports: import inspect
  from typing import List, Tuple
  import numpy
  import tensorflow
  from .tf_utils import stable_softmax
  from .utils import add_start_docstrings
  from .utils.logging import get_logger
label_desc: Use image node_id 1 to create a new TFRepetitionPenaltyLogitsProcessor object from inherited base classes: TFLogitsProcessor with example: obj = TFRepetitionPenaltyLogitsProcessor(penalty)