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: torch.Tensor,
  ) -> List[Tuple[str, float]]:
      # compute pred with argmax for attention models
      out_idxs = logits.argmax(-1)
      preds_prob = torch.softmax(logits, -1).max(dim=-1)[0]
  
      # Manual decoding
      word_values = [
          "".join(self._embedding[idx] for idx in encoded_seq).split(
              "<eos>"
          )[0]
          for encoded_seq in out_idxs.cpu().numpy()
      ]
      # compute probabilties for each word up to the EOS token
      probs = [
          preds_prob[i, : len(word)].clip(0, 1).mean().item()
          if word
          else 0.0
          for i, word in enumerate(word_values)
      ]
  
      return list(zip(word_values, probs))
  
imports: from copy import deepcopy
  from typing import Any, Callable, Dict, List, Optional, Tuple
  import torch
  from torch import nn
  from torch.nn import functional
  from torchvision.models._utils import IntermediateLayerGetter
  from doctr.datasets import VOCABS
  from ...classification import vit_b, vit_s
  from ...utils.pytorch 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