class_docstr: A class containing all of the functions supporting generation, to be used as a mixin in [`TFPreTrainedModel`].
class_docstr_tok: ["A","class","containing","all","of","the","functions","supporting","generation",",","to","be","used","as","a","mixin","in","[","`","TFPreTrainedModel","`","]","."]
docstr: This class returns a [`TFLogitsProcessorList`] list object that contains all relevant [`TFLogitsWarper`]
  instances used for multinomial sampling.
code: def _get_logits_warper(
      self,
      top_k: Optional[int] = None,
      top_p: Optional[float] = None,
      temperature: Optional[float] = None,
  ) -> TFLogitsProcessorList:
      """
      This class returns a [`TFLogitsProcessorList`] list object that contains all relevant [`TFLogitsWarper`]
      instances used for multinomial sampling.
      """
  
      # init warp parameters
      top_k = top_k if top_k is not None else self.config.top_k
      top_p = top_p if top_p is not None else self.config.top_p
      temperature = (
          temperature
          if temperature is not None
          else self.config.temperature
      )
      # instantiate warpers list
      warpers = TFLogitsProcessorList()
  
      # the following idea is largely copied from this PR: https://github.com/huggingface/transformers/pull/5420/files
      # all samplers can be found in `generation_utils_samplers.py`
      if temperature is not None and temperature != 1.0:
          warpers.append(TFTemperatureLogitsWarper(temperature))
      if top_k is not None and top_k != 0:
          warpers.append(
              TFTopKLogitsWarper(top_k=top_k, min_tokens_to_keep=1)
          )
      if top_p is not None and top_p < 1.0:
          warpers.append(
              TFTopPLogitsWarper(top_p=top_p, min_tokens_to_keep=1)
          )
      return warpers
  
imports: import inspect
  import warnings
  from dataclasses import dataclass
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  import tensorflow
  from tensorflow.compiler.tf2xla.python.xla import dynamic_update_slice
  from .generation_tf_logits_process import TFForcedBOSTokenLogitsProcessor, TFForcedEOSTokenLogitsProcessor, TFForceTokensLogitsProcessor, TFLogitsProcessorList, TFMinLengthLogitsProcessor, TFNoBadWordsLogitsProcessor, TFNoRepeatNGramLogitsProcessor, TFRepetitionPenaltyLogitsProcessor, TFSuppressTokensAtBeginLogitsProcessor, TFSuppressTokensLogitsProcessor, TFTemperatureLogitsWarper, TFTopKLogitsWarper, TFTopPLogitsWarper
  from .models.auto import TF_MODEL_FOR_CAUSAL_LM_MAPPING, TF_MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING, TF_MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING, TF_MODEL_FOR_VISION_2_SEQ_MAPPING
  from .tf_utils import shape_list, stable_softmax
  from .utils import ModelOutput, logging
label_desc: Use image node_id 19 for calling the TFGenerationMixin obj's underlying member method code with example usage: obj._get_logits_warper(top_k, top_p, temperature) and returns: warpers