class_docstr: An implementation of the gated fusion mechanism.
  For details see this paper: `"GMAN: A Graph Multi-Attention Network for Traffic Prediction."
  <https://arxiv.org/pdf/1911.08415.pdf>`_
  
  Args:
      D (int) : dimension of output.
      bn_decay (float): batch normalization momentum.
docstr: Making a forward pass of the gated fusion mechanism.
  
  Arg types:
      * **HS** (PyTorch Float Tensor) - Spatial attention scores, with shape (batch_size, num_step, num_nodes, D).
      * **HT** (Pytorch Float Tensor) - Temporal attention scores, with shape (batch_size, num_step, num_nodes, D).
  
  Return types:
      * **H** (PyTorch Float Tensor) - Spatial-temporal attention scores, with shape (batch_size, num_step, num_nodes, D).
docstr_tok: ["Making","a","forward","pass","of","the","gated","fusion","mechanism",".","Arg","types",":","*","*","*","HS","*","*","(","PyTorch","Float","Tensor",")","-","Spatial","attention","scores",",","with","shape","(","batch_size",",","num_step",",","num_nodes",",","D",")",".","*","*","*","HT","*","*","(","Pytorch","Float","Tensor",")","-","Temporal","attention","scores",",","with","shape","(","batch_size",",","num_step",",","num_nodes",",","D",")",".","Return","types",":","*","*","*","H","*","*","(","PyTorch","Float","Tensor",")","-","Spatial-temporal","attention","scores",",","with","shape","(","batch_size",",","num_step",",","num_nodes",",","D",")","."]
code: def forward(
      self, HS: torch.FloatTensor, HT: torch.FloatTensor
  ) -> torch.FloatTensor:
      """
      Making a forward pass of the gated fusion mechanism.
  
      Arg types:
          * **HS** (PyTorch Float Tensor) - Spatial attention scores, with shape (batch_size, num_step, num_nodes, D).
          * **HT** (Pytorch Float Tensor) - Temporal attention scores, with shape (batch_size, num_step, num_nodes, D).
  
      Return types:
          * **H** (PyTorch Float Tensor) - Spatial-temporal attention scores, with shape (batch_size, num_step, num_nodes, D).
      """
      XS = self._fully_connected_xs(HS)
      XT = self._fully_connected_xt(HT)
      z = torch.sigmoid(torch.add(XS, XT))
      H = torch.add(torch.mul(z, HS), torch.mul(1 - z, HT))
      H = self._fully_connected_h(H)
      del XS, XT, z
      return H
  
imports: import math
  from typing import Union, Callable, Optional
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 2 for calling the GatedFusion obj's underlying member method code with example usage: obj.forward(HS, HT) and returns: H