class_docstr: Compute non-attention layer.
  
  This layer is a dummy attention layer to be compatible with other
  attention-based models.
class_docstr_tok: ["Compute","non-attention","layer",".","This","layer","is","a","dummy","attention","layer","to","be","compatible","with","other","attention-based","models","."]
docstr: Compute NoAtt forward layer.
  
  Args:
      enc_hs (chainer.Variable | N-dimensional array):
          Input variable from encoders.
      dec_z: Dummy.
      att_prev (chainer.Variable | None): Attention weight.
  
  Returns:
      chainer.Variable: Sum over flames.
      chainer.Variable: Attention weight.
docstr_tok: ["Compute","NoAtt","forward","layer",".","Args",":","enc_hs","(","chainer.Variable","|","N-dimensional","array",")",":","Input","variable","from","encoders",".","dec_z",":","Dummy",".","att_prev","(","chainer.Variable","|","None",")",":","Attention","weight",".","Returns",":","chainer.Variable",":","Sum","over","flames",".","chainer.Variable",":","Attention","weight","."]
code: def __call__(self, enc_hs, dec_z, att_prev):
      """Compute NoAtt forward layer.
  
      Args:
          enc_hs (chainer.Variable | N-dimensional array):
              Input variable from encoders.
          dec_z: Dummy.
          att_prev (chainer.Variable | None): Attention weight.
  
      Returns:
          chainer.Variable: Sum over flames.
          chainer.Variable: Attention weight.
  
      """
      # pre-compute all h outside the decoder loop
      if self.pre_compute_enc_h is None:
          self.enc_h = F.pad_sequence(enc_hs)  # utt x frame x hdim
          self.h_length = self.enc_h.shape[1]
  
      # initialize attention weight with uniform dist.
      if att_prev is None:
          att_prev = [
              self.xp.full(
                  hh.shape[0], 1.0 / hh.shape[0], dtype=np.float32
              )
              for hh in enc_hs
          ]
          att_prev = [chainer.Variable(att) for att in att_prev]
          att_prev = F.pad_sequence(att_prev)
          self.c = F.sum(
              self.enc_h
              * F.broadcast_to(
                  F.expand_dims(att_prev, 2), self.enc_h.shape
              ),
              axis=1,
          )
  
      return self.c, att_prev
  
file_path: espnet/espnet/nets/chainer_backend/rnn/attentions.py
imports: import chainer
  import chainer.functions
  import chainer.links
  import numpy
label_desc: Use image node_id 3 for calling the NoAtt obj's underlying member method code with example usage: obj.__call__(enc_hs, dec_z, att_prev) and returns: self,  att_prev