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 __init__(self, ngram_size: int):
      if not isinstance(ngram_size, int) or ngram_size <= 0:
          raise ValueError(
              f"`ngram_size` has to be a strictly positive integer, but is {ngram_size}"
          )
      self.ngram_size = ngram_size
  
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 TFNoRepeatNGramLogitsProcessor object from inherited base classes: TFLogitsProcessor with example: obj = TFNoRepeatNGramLogitsProcessor(ngram_size)