class_docstr: Post processor for ViTSTR architecture
  
  Args:
  ----
      vocab: string containing the ordered sequence of supported characters
class_docstr_tok: ["Post","processor","for","ViTSTR","architecture","Args",":","--","--","vocab",":","string","containing","the","ordered","sequence","of","supported","characters"]
code: def __call__(
      self,
      logits: tf.Tensor,
  ) -> List[Tuple[str, float]]:
      # compute pred with argmax for attention models
      out_idxs = tf.math.argmax(logits, axis=2)
      preds_prob = tf.math.reduce_max(
          tf.nn.softmax(logits, axis=-1), axis=-1
      )
  
      # decode raw output of the model with tf_label_to_idx
      out_idxs = tf.cast(out_idxs, dtype="int32")
      embedding = tf.constant(self._embedding, dtype=tf.string)
      decoded_strings_pred = tf.strings.reduce_join(
          inputs=tf.nn.embedding_lookup(embedding, out_idxs), axis=-1
      )
      decoded_strings_pred = tf.strings.split(
          decoded_strings_pred, "<eos>"
      )
      decoded_strings_pred = tf.sparse.to_dense(
          decoded_strings_pred.to_sparse(), default_value="not valid"
      )[:, 0]
      word_values = [
          word.decode()
          for word in decoded_strings_pred.numpy().tolist()
      ]
  
      # compute probabilties for each word up to the EOS token
      probs = [
          preds_prob[i, : len(word)].numpy().clip(0, 1).mean().item()
          if word
          else 0.0
          for i, word in enumerate(word_values)
      ]
  
      return list(zip(word_values, probs))
  
file_path: doctr/doctr/models/recognition/vitstr/tensorflow.py
imports: from copy import deepcopy
  from typing import Any, Dict, List, Optional, Tuple
  import tensorflow
  from tensorflow.keras import Model, layers
  from doctr.datasets import VOCABS
  from ...classification import vit_b, vit_s
  from ...utils.tensorflow import _bf16_to_float32, load_pretrained_params
  from .base import _ViTSTR, _ViTSTRPostProcessor
label_desc: Use image node_id 1 for calling the ViTSTRPostProcessor obj's underlying member method code with example usage: obj.__call__(logits) and returns: list