class_docstr: Location layer used in the Attention model.
  
  Args:
      attention_n_filter (int): Number of filters for attention model.
      attention_kernel_size (int): Kernel size for attention model.
      attention_hidden_dim (int): Dimension of attention hidden representation.
class_docstr_tok: ["Location","layer","used","in","the","Attention","model",".","Args",":","attention_n_filter","(","int",")",":","Number","of","filters","for","attention","model",".","attention_kernel_size","(","int",")",":","Kernel","size","for","attention","model",".","attention_hidden_dim","(","int",")",":","Dimension","of","attention","hidden","representation","."]
code: def __init__(
      self,
      attention_n_filter: int,
      attention_kernel_size: int,
      attention_hidden_dim: int,
  ):
      super().__init__()
      padding = int((attention_kernel_size - 1) / 2)
      self.location_conv = _get_conv1d_layer(
          2,
          attention_n_filter,
          kernel_size=attention_kernel_size,
          padding=padding,
          bias=False,
          stride=1,
          dilation=1,
      )
      self.location_dense = _get_linear_layer(
          attention_n_filter,
          attention_hidden_dim,
          bias=False,
          w_init_gain="tanh",
      )
  
imports: import warnings
  from typing import List, Optional, Tuple, Union
  import torch
  from torch import nn, Tensor
  from torch.nn import functional
label_desc: Use image node_id 1 to create a new _LocationLayer object from inherited base classes: nn with example: obj = _LocationLayer(attention_n_filter, attention_kernel_size, attention_hidden_dim)