class_docstr: [`TFLogitsProcessor`] that enforces no repetition of n-grams. See
  [Fairseq](https://github.com/pytorch/fairseq/blob/a07cb6f40480928c9e0548b737aadd36ee66ac76/fairseq/sequence_generator.py#L345).
  
  Args:
      ngram_size (`int`):
          All ngrams of size `ngram_size` can only occur once.
class_docstr_tok: ["[","`","TFLogitsProcessor","`","]","that","enforces","no","repetition","of","n-grams",".","See","[","Fairseq","]","(","https",":","\/\/github.com\/pytorch\/fairseq\/blob\/a07cb6f40480928c9e0548b737aadd36ee66ac76\/fairseq\/sequence_generator.py","#","L345",")",".","Args",":","ngram_size","(","`","int","`",")",":","All","ngrams","of","size","`","ngram_size","`","can","only","occur","once","."]
code: def __call__(
      self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: int
  ) -> tf.Tensor:
      # TODO (joao): enable XLA on this logits processor. See discussion and attempts in
      # https://github.com/huggingface/transformers/pull/16974
      if not tf.executing_eagerly():
          raise NotImplementedError(
              "TFNoRepeatNGramLogitsProcessor is only implemented for eager execution."
          )
  
      batch_size, vocab_size = scores.shape
      banned_tokens = self.calc_banned_ngram_tokens(
          input_ids, batch_size, cur_len
      )
  
      # create banned_tokens boolean mask
      banned_tokens_indices_mask = []
      for banned_tokens_slice in banned_tokens:
          banned_tokens_indices_mask.append(
              [
                  True if token in banned_tokens_slice else False
                  for token in range(vocab_size)
              ]
          )
  
      scores = tf.where(
          tf.convert_to_tensor(
              banned_tokens_indices_mask, dtype=tf.bool
          ),
          -float("inf"),
          scores,
      )
  
      return scores
  
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 3 for calling the TFNoRepeatNGramLogitsProcessor obj's underlying member method code with example usage: obj.__call__(input_ids, scores, cur_len) and returns: scores