class_docstr: Parallel Decoder module with beam-search in SAR.
  
  Args:
      beam_width (int): Width for beam search.
class_docstr_tok: ["Parallel","Decoder","module","with","beam-search","in","SAR",".","Args",":","beam_width","(","int",")",":","Width","for","beam","search","."]
code: def __init__(
      self,
      beam_width=5,
      num_classes=37,
      enc_bi_rnn=False,
      dec_bi_rnn=False,
      dec_do_rnn=0,
      dec_gru=False,
      d_model=512,
      d_enc=512,
      d_k=64,
      pred_dropout=0.0,
      max_seq_len=40,
      mask=True,
      start_idx=0,
      padding_idx=0,
      pred_concat=False,
      init_cfg=None,
      **kwargs,
  ):
      super().__init__(
          num_classes,
          enc_bi_rnn,
          dec_bi_rnn,
          dec_do_rnn,
          dec_gru,
          d_model,
          d_enc,
          d_k,
          pred_dropout,
          max_seq_len,
          mask,
          start_idx,
          padding_idx,
          pred_concat,
          init_cfg=init_cfg,
      )
      assert isinstance(beam_width, int)
      assert beam_width > 0
  
      self.beam_width = beam_width
  
file_path: mmocr/mmocr/models/textrecog/decoders/sar_decoder_with_bs.py
imports: from queue import PriorityQueue
  import torch
  import torch.nn.functional
  import mmocr.utils
  from mmocr.registry import MODELS
  from .None import ParallelSARDecoder
label_desc: Use image node_id 1 to create a new ParallelSARDecoderWithBS object from inherited base classes: ParallelSARDecoder with example: obj = ParallelSARDecoderWithBS(beam_width, num_classes, enc_bi_rnn, dec_bi_rnn, dec_do_rnn, dec_gru, d_model, d_enc, d_k, pred_dropout, max_seq_len, mask, start_idx, padding_idx, pred_concat, init_cfg)