class_docstr: Decoder layer.
  
  Args:
      eprojs (int): Dimension of input variables from encoder.
      odim (int): The output dimension.
      dtype (str): Decoder type.
      dlayers (int): Number of layers for decoder.
      dunits (int): Dimension of input vector of decoder.
      sos (int): Number to indicate the start of sequences.
      eos (int): Number to indicate the end of sequences.
      att (Module): Attention module defined at
          `espnet.espnet.nets.chainer_backend.attentions`.
      verbose (int): Verbosity level.
      char_list (List[str]): List of all characters.
      labeldist (numpy.array): Distributed array of counted transcript length.
      lsm_weight (float): Weight to use when calculating the training loss.
      sampling_probability (float): Threshold for scheduled sampling.
class_docstr_tok: ["Decoder","layer",".","Args",":","eprojs","(","int",")",":","Dimension","of","input","variables","from","encoder",".","odim","(","int",")",":","The","output","dimension",".","dtype","(","str",")",":","Decoder","type",".","dlayers","(","int",")",":","Number","of","layers","for","decoder",".","dunits","(","int",")",":","Dimension","of","input","vector","of","decoder",".","sos","(","int",")",":","Number","to","indicate","the","start","of","sequences",".","eos","(","int",")",":","Number","to","indicate","the","end","of","sequences",".","att","(","Module",")",":","Attention","module","defined","at","`","espnet.espnet.nets.chainer_backend.attentions","`",".","verbose","(","int",")",":","Verbosity","level",".","char_list","(","List","[","str","]",")",":","List","of","all","characters",".","labeldist","(","numpy.array",")",":","Distributed","array","of","counted","transcript","length",".","lsm_weight","(","float",")",":","Weight","to","use","when","calculating","the","training","loss",".","sampling_probability","(","float",")",":","Threshold","for","scheduled","sampling","."]
code: def __init__(
      self,
      eprojs,
      odim,
      dtype,
      dlayers,
      dunits,
      sos,
      eos,
      att,
      verbose=0,
      char_list=None,
      labeldist=None,
      lsm_weight=0.0,
      sampling_probability=0.0,
  ):
      super(Decoder, self).__init__()
      with self.init_scope():
          self.embed = DL.EmbedID(odim, dunits)
          self.rnn0 = (
              L.StatelessLSTM(dunits + eprojs, dunits)
              if dtype == "lstm"
              else L.StatelessGRU(dunits + eprojs, dunits)
          )
          for i in range(1, dlayers):
              setattr(
                  self,
                  "rnn%d" % i,
                  L.StatelessLSTM(dunits, dunits)
                  if dtype == "lstm"
                  else L.StatelessGRU(dunits, dunits),
              )
          self.output = L.Linear(dunits, odim)
      self.dtype = dtype
      self.loss = None
      self.att = att
      self.dlayers = dlayers
      self.dunits = dunits
      self.sos = sos
      self.eos = eos
      self.verbose = verbose
      self.char_list = char_list
      # for label smoothing
      self.labeldist = labeldist
      self.vlabeldist = None
      self.lsm_weight = lsm_weight
      self.sampling_probability = sampling_probability
  
file_path: espnet/espnet/nets/chainer_backend/rnn/decoders.py
imports: import logging
  import random
  from argparse import Namespace
  import chainer
  import chainer.functions
  import chainer.links
  import numpy
  import espnet.nets.chainer_backend.deterministic_embed_id
  from espnet.nets.ctc_prefix_score import CTCPrefixScore
  from espnet.nets.e2e_asr_common import end_detect
label_desc: Use image node_id 1 to create a new Decoder object from inherited base classes: chainer with example: obj = Decoder(eprojs, odim, dtype, dlayers, dunits, sos, eos, att, verbose, char_list, labeldist, lsm_weight, sampling_probability)