class_docstr: RNN decoder module for Transducer model.
  
  Args:
      odim: Output dimension.
      dtype: Decoder units type.
      dlayers: Number of decoder layers.
      dunits: Number of decoder units per layer..
      embed_dim: Embedding layer dimension.
      dropout_rate: Dropout rate for decoder layers.
      dropout_rate_embed: Dropout rate for embedding layer.
      blank_id: Blank symbol ID.
class_docstr_tok: ["RNN","decoder","module","for","Transducer","model",".","Args",":","odim",":","Output","dimension",".","dtype",":","Decoder","units","type",".","dlayers",":","Number","of","decoder","layers",".","dunits",":","Number","of","decoder","units","per","layer","..","embed_dim",":","Embedding","layer","dimension",".","dropout_rate",":","Dropout","rate","for","decoder","layers",".","dropout_rate_embed",":","Dropout","rate","for","embedding","layer",".","blank_id",":","Blank","symbol","ID","."]
docstr: Initialize decoder states.
  
  Args:
      batch_size: Batch size.
  
  Returns:
      : Initial decoder hidden states. ((N, B, D_dec), (N, B, D_dec))
docstr_tok: ["Initialize","decoder","states",".","Args",":","batch_size",":","Batch","size",".","Returns",":",":","Initial","decoder","hidden","states",".","(","(","N",",","B",",","D_dec",")",",","(","N",",","B",",","D_dec",")",")"]
code: def init_state(
      self, batch_size: int
  ) -> Tuple[torch.Tensor, Optional[torch.tensor]]:
      """Initialize decoder states.
  
      Args:
          batch_size: Batch size.
  
      Returns:
          : Initial decoder hidden states. ((N, B, D_dec), (N, B, D_dec))
  
      """
      h_n = torch.zeros(
          self.dlayers,
          batch_size,
          self.dunits,
          device=self.device,
      )
  
      if self.dtype == "lstm":
          c_n = torch.zeros(
              self.dlayers,
              batch_size,
              self.dunits,
              device=self.device,
          )
  
          return (h_n, c_n)
  
      return (h_n, None)
  
file_path: espnet/espnet/nets/pytorch_backend/transducer/rnn_decoder.py
imports: from typing import Any, Dict, List, Optional, Tuple, Union
  import torch
  from espnet.nets.transducer_decoder_interface import ExtendedHypothesis, Hypothesis, TransducerDecoderInterface
label_desc: Use image node_id 3 for calling the RNNDecoder obj's underlying member method code with example usage: obj.init_state(batch_size) and returns: h_n,  None, h_n,  c_n