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 __call__(
      self, input_ids: tf.Tensor, scores: tf.Tensor, cur_len: int
  ) -> tf.Tensor:
      top_k = min(
          max(self.top_k, self.min_tokens_to_keep), scores.shape[-1]
      )  # Safety check
      # Boolean mask containing all tokens with a probability less than the last token of the top-k
      indices_to_remove = (
          scores < tf.math.top_k(scores, k=top_k)[0][..., -1:]
      )
      next_scores = tf.where(
          indices_to_remove, self.filter_value, scores
      )
      return next_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 2 for calling the TFTopKLogitsWarper obj's underlying member method code with example usage: obj.__call__(input_ids, scores, cur_len) and returns: next_scores