class_docstr: Constructs a MGP-STR processor which wraps an image processor and MGP-STR tokenizers into a single
  
  [`MgpstrProcessor`] offers all the functionalities of `ViTImageProcessor`] and [`MgpstrTokenizer`]. See the
  [`~MgpstrProcessor.__call__`] and [`~MgpstrProcessor.batch_decode`] for more information.
  
  Args:
      image_processor (`ViTImageProcessor`, *optional*):
          An instance of `ViTImageProcessor`. The image processor is a required input.
      tokenizer ([`MgpstrTokenizer`], *optional*):
          The tokenizer is a required input.
docstr: Convert a list of lists of token ids into a list of strings by calling decode.
  
  Args:
      sequences (`torch.Tensor`):
          List of tokenized input ids.
  
  Returns:
      `Dict[str, any]`: Dictionary of all the outputs of the decoded results.
          generated_text (`List[str]`): The final results after fusion of char, bpe, and wp. scores
          (`List[float]`): The final scores after fusion of char, bpe, and wp. char_preds (`List[str]`): The list
          of character decoded sentences. bpe_preds (`List[str]`): The list of bpe decoded sentences. wp_preds
          (`List[str]`): The list of wp decoded sentences.
  
  This method forwards all its arguments to PreTrainedTokenizer's [`~PreTrainedTokenizer.batch_decode`]. Please
  refer to the docstring of this method for more information.
docstr_tok: ["Convert","a","list","of","lists","of","token","ids","into","a","list","of","strings","by","calling","decode",".","Args",":","sequences","(","`","torch.Tensor","`",")",":","List","of","tokenized","input","ids",".","Returns",":","`","Dict","[","str",",","any","]","`",":","Dictionary","of","all","the","outputs","of","the","decoded","results",".","generated_text","(","`","List","[","str","]","`",")",":","The","final","results","after","fusion","of","char",",","bpe",",","and","wp",".","scores","(","`","List","[","float","]","`",")",":","The","final","scores","after","fusion","of","char",",","bpe",",","and","wp",".","char_preds","(","`","List","[","str","]","`",")",":","The","list","of","character","decoded","sentences",".","bpe_preds","(","`","List","[","str","]","`",")",":","The","list","of","bpe","decoded","sentences",".","wp_preds","(","`","List","[","str","]","`",")",":","The","list","of","wp","decoded","sentences",".","This","method","forwards","all","its","arguments","to","PreTrainedTokenizer","'s","[","`","~PreTrainedTokenizer.batch_decode","`","]",".","Please","refer","to","the","docstring","of","this","method","for","more","information","."]
code: def batch_decode(self, sequences):
      """
      Convert a list of lists of token ids into a list of strings by calling decode.
  
      Args:
          sequences (`torch.Tensor`):
              List of tokenized input ids.
  
      Returns:
          `Dict[str, any]`: Dictionary of all the outputs of the decoded results.
              generated_text (`List[str]`): The final results after fusion of char, bpe, and wp. scores
              (`List[float]`): The final scores after fusion of char, bpe, and wp. char_preds (`List[str]`): The list
              of character decoded sentences. bpe_preds (`List[str]`): The list of bpe decoded sentences. wp_preds
              (`List[str]`): The list of wp decoded sentences.
  
      This method forwards all its arguments to PreTrainedTokenizer's [`~PreTrainedTokenizer.batch_decode`]. Please
      refer to the docstring of this method for more information.
      """
      char_preds, bpe_preds, wp_preds = sequences
      batch_size = char_preds.size(0)
  
      char_strs, char_scores = self._decode_helper(char_preds, "char")
      bpe_strs, bpe_scores = self._decode_helper(bpe_preds, "bpe")
      wp_strs, wp_scores = self._decode_helper(wp_preds, "wp")
  
      final_strs = []
      final_scores = []
      for i in range(batch_size):
          scores = [char_scores[i], bpe_scores[i], wp_scores[i]]
          strs = [char_strs[i], bpe_strs[i], wp_strs[i]]
          max_score_index = scores.index(max(scores))
          final_strs.append(strs[max_score_index])
          final_scores.append(scores[max_score_index])
  
      out = {}
      out["generated_text"] = final_strs
      out["scores"] = final_scores
      out["char_preds"] = char_strs
      out["bpe_preds"] = bpe_strs
      out["wp_preds"] = wp_strs
      return out
  
file_path: transformers/src/transformers/models/mgp_str/processing_mgp_str.py
imports: import warnings
  from transformers import AutoTokenizer
  from transformers.utils import is_torch_available
  from transformers.utils.generic import ExplicitEnum
  from ...processing_utils import ProcessorMixin
label_desc: Use image node_id 3 for calling the MgpstrProcessor obj's underlying member method code with example usage: obj.batch_decode(sequences) and returns: out