class_docstr: This class implements location-aware attention module for seq2seq learning.
  
  Reference: Attention-Based Models for Speech Recognition, Chorowski et.al.
  https://arxiv.org/pdf/1506.07503.pdf
  
  Arguments
  ---------
  attn_dim : int
      Size of the attention feature.
  output_dim : int
      Size of the output context vector.
  conv_channels : int
      Number of channel for location feature.
  kernel_size : int
      Kernel size of convolutional layer for location feature.
  scaling : float
      The factor controls the sharpening degree (default: 1.0).
  
  Example
  -------
  >>> enc_tensor = torch.rand([4, 10, 20])
  >>> enc_len = torch.ones([4]) * 10
  >>> dec_tensor = torch.rand([4, 25])
  >>> net = LocationAwareAttention(
  ...     enc_dim=20,
  ...     dec_dim=25,
  ...     attn_dim=30,
  ...     output_dim=5,
  ...     conv_channels=10,
  ...     kernel_size=100)
  >>> out_tensor, out_weight = net(enc_tensor, enc_len, dec_tensor)
  >>> out_tensor.shape
  torch.Size([4, 5])
docstr: Reset the memory in attention module.
          
docstr_tok: ["Reset","the","memory","in","attention","module","."]
code: def reset(self):
      """Reset the memory in attention module."""
      self.enc_len = None
      self.precomputed_enc_h = None
      self.mask = None
      self.prev_attn = None
  
imports: import torch
  import logging
  import torch.nn
  import numpy
  from typing import Optional
  from speechbrain.dataio.dataio import length_to_mask
  import torch.nn.functional
  import math
label_desc: Use image node_id 2 for calling the LocationAwareAttention obj's underlying member method code with example usage: obj.reset() without return types