class_docstr: [`TFLogitsWarper`] that performs top-k, i.e. restricting to the k highest probability elements.
  
  Args:
      top_k (`int`):
          The number of highest probability vocabulary tokens to keep for top-k-filtering.
      filter_value (`float`, *optional*, defaults to `-float("Inf")`):
          All filtered values will be set to this float value.
      min_tokens_to_keep (`int`, *optional*, defaults to 1):
          Minimum number of tokens that cannot be filtered.
class_docstr_tok: ["[","`","TFLogitsWarper","`","]","that","performs","top-k",",","i.e",".","restricting","to","the","k","highest","probability","elements",".","Args",":","top_k","(","`","int","`",")",":","The","number","of","highest","probability","vocabulary","tokens","to","keep","for","top-k-filtering",".","filter_value","(","`","float","`",",","*","optional","*",",","defaults","to","`","-float","(","``","Inf","''",")","`",")",":","All","filtered","values","will","be","set","to","this","float","value",".","min_tokens_to_keep","(","`","int","`",",","*","optional","*",",","defaults","to","1",")",":","Minimum","number","of","tokens","that","can","not","be","filtered","."]
code: def __init__(
      self,
      top_k: int,
      filter_value: float = -float("Inf"),
      min_tokens_to_keep: int = 1,
  ):
      if not isinstance(top_k, int) or top_k <= 0:
          raise ValueError(
              f"`top_k` has to be a strictly positive integer, but is {top_k}"
          )
  
      self.top_k = top_k
      self.filter_value = filter_value
      self.min_tokens_to_keep = min_tokens_to_keep
  
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 TFTopKLogitsWarper object from inherited base classes: TFLogitsWarper with example: obj = TFTopKLogitsWarper(top_k, filter_value, min_tokens_to_keep)