class_docstr: Post processor for SAR architectures
  
  Args:
  ----
      vocab: string containing the ordered sequence of supported characters
class_docstr_tok: ["Post","processor","for","SAR","architectures","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)
      # N x L
      probs = tf.gather(
          tf.nn.softmax(logits, axis=-1),
          out_idxs,
          axis=-1,
          batch_dims=2,
      )
      # Take the minimum confidence of the sequence
      probs = tf.math.reduce_min(probs, 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()
      ]
  
      return list(zip(word_values, probs.numpy().clip(0, 1).tolist()))
  
imports: from copy import deepcopy
  from typing import Any, Dict, List, Optional, Tuple
  import tensorflow
  from tensorflow.keras import Model, Sequential, layers
  from doctr.datasets import VOCABS
  from doctr.utils.repr import NestedObject
  from ...classification import resnet31
  from ...utils.tensorflow import _bf16_to_float32, load_pretrained_params
  from ..core import RecognitionModel, RecognitionPostProcessor
label_desc: Use image node_id 1 for calling the SARPostProcessor obj's underlying member method code with example usage: obj.__call__(logits) and returns: list