class_docstr: Compute location-based attention.
  
  Args:
      eprojs (int | None): Dimension of input vectors from encoder.
      dunits (int | None): Dimension of input vectors for decoder.
      att_dim (int): Dimension of input vectors for attention.
      aconv_chans (int): Number of channels of output arrays from convolutional layer.
      aconv_filts (int): Size of filters of convolutional layer.
class_docstr_tok: ["Compute","location-based","attention",".","Args",":","eprojs","(","int","|","None",")",":","Dimension","of","input","vectors","from","encoder",".","dunits","(","int","|","None",")",":","Dimension","of","input","vectors","for","decoder",".","att_dim","(","int",")",":","Dimension","of","input","vectors","for","attention",".","aconv_chans","(","int",")",":","Number","of","channels","of","output","arrays","from","convolutional","layer",".","aconv_filts","(","int",")",":","Size","of","filters","of","convolutional","layer","."]
code: def __init__(self, eprojs, dunits, att_dim, aconv_chans, aconv_filts):
      super(AttLoc, self).__init__()
      with self.init_scope():
          self.mlp_enc = L.Linear(eprojs, att_dim)
          self.mlp_dec = L.Linear(dunits, att_dim, nobias=True)
          self.mlp_att = L.Linear(aconv_chans, att_dim, nobias=True)
          self.loc_conv = L.Convolution2D(
              1,
              aconv_chans,
              ksize=(1, 2 * aconv_filts + 1),
              pad=(0, aconv_filts),
          )
          self.gvec = L.Linear(att_dim, 1)
  
      self.dunits = dunits
      self.eprojs = eprojs
      self.att_dim = att_dim
      self.h_length = None
      self.enc_h = None
      self.pre_compute_enc_h = None
      self.aconv_chans = aconv_chans
  
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 1 to create a new AttLoc object from inherited base classes: chainer with example: obj = AttLoc(eprojs, dunits, att_dim, aconv_chans, aconv_filts)