class_docstr: An implementation of the MTGNN layer.
  For details see this paper: `"Connecting the Dots: Multivariate Time Series Forecasting with Graph Neural Networks."
  <https://arxiv.org/pdf/2005.11650.pdf>`_
  
  Args:
      dilation_exponential (int): Dilation exponential.
      rf_size_i (int): Size of receptive field.
      kernel_size (int): Size of kernel for convolution, to calculate receptive field size.
      j (int): Iteration index.
      residual_channels (int): Residual channels.
      conv_channels (int): Convolution channels.
      skip_channels (int): Skip channels.
      kernel_set (list of int): List of kernel sizes.
      new_dilation (int): Dilation.
      layer_norm_affline (bool): Whether to do elementwise affine in Layer Normalization.
      gcn_true (bool): Whether to add graph convolution layer.
      seq_length (int): Length of input sequence.
      receptive_field (int): Receptive field.
      dropout (float): Droupout rate.
      gcn_depth (int): Graph convolution depth.
      num_nodes (int): Number of nodes in the graph.
      propalpha (float): Prop alpha, ratio of retaining the root nodes's original states in mix-hop propagation, a value between 0 and 1.
class_docstr_tok: ["An","implementation","of","the","MTGNN","layer",".","For","details","see","this","paper",":","`","``","Connecting","the","Dots",":","Multivariate","Time","Series","Forecasting","with","Graph","Neural","Networks",".","''","<","https",":","\/\/arxiv.org\/pdf\/2005.11650.pdf",">","`","_","Args",":","dilation_exponential","(","int",")",":","Dilation","exponential",".","rf_size_i","(","int",")",":","Size","of","receptive","field",".","kernel_size","(","int",")",":","Size","of","kernel","for","convolution",",","to","calculate","receptive","field","size",".","j","(","int",")",":","Iteration","index",".","residual_channels","(","int",")",":","Residual","channels",".","conv_channels","(","int",")",":","Convolution","channels",".","skip_channels","(","int",")",":","Skip","channels",".","kernel_set","(","list","of","int",")",":","List","of","kernel","sizes",".","new_dilation","(","int",")",":","Dilation",".","layer_norm_affline","(","bool",")",":","Whether","to","do","elementwise","affine","in","Layer","Normalization",".","gcn_true","(","bool",")",":","Whether","to","add","graph","convolution","layer",".","seq_length","(","int",")",":","Length","of","input","sequence",".","receptive_field","(","int",")",":","Receptive","field",".","dropout","(","float",")",":","Droupout","rate",".","gcn_depth","(","int",")",":","Graph","convolution","depth",".","num_nodes","(","int",")",":","Number","of","nodes","in","the","graph",".","propalpha","(","float",")",":","Prop","alpha",",","ratio","of","retaining","the","root","nodes","'s","original","states","in","mix-hop","propagation",",","a","value","between","0","and","1","."]
docstr: Making a forward pass of MTGNN layer.
  
  Arg types:
      * **X** (PyTorch FloatTensor) - Input feature tensor,
          with shape (batch_size, in_dim, num_nodes, seq_len).
      * **X_skip** (PyTorch FloatTensor) - Input feature tensor for skip connection,
          with shape (batch_size, in_dim, num_nodes, seq_len).
      * **A_tilde** (Pytorch FloatTensor or None) - Predefined adjacency matrix.
      * **idx** (Pytorch LongTensor) - Input indices.
      * **training** (bool) - Whether in traning mode.
  
  Return types:
      * **X** (PyTorch FloatTensor) - Output sequence tensor,
          with shape (batch_size, seq_len, num_nodes, seq_len).
      * **X_skip** (PyTorch FloatTensor) - Output feature tensor for skip connection,
          with shape (batch_size, in_dim, num_nodes, seq_len).
code: def forward(
      self,
      X: torch.FloatTensor,
      X_skip: torch.FloatTensor,
      A_tilde: Optional[torch.FloatTensor],
      idx: torch.LongTensor,
      training: bool,
  ) -> torch.FloatTensor:
      """
      Making a forward pass of MTGNN layer.
  
      Arg types:
          * **X** (PyTorch FloatTensor) - Input feature tensor,
              with shape (batch_size, in_dim, num_nodes, seq_len).
          * **X_skip** (PyTorch FloatTensor) - Input feature tensor for skip connection,
              with shape (batch_size, in_dim, num_nodes, seq_len).
          * **A_tilde** (Pytorch FloatTensor or None) - Predefined adjacency matrix.
          * **idx** (Pytorch LongTensor) - Input indices.
          * **training** (bool) - Whether in traning mode.
  
      Return types:
          * **X** (PyTorch FloatTensor) - Output sequence tensor,
              with shape (batch_size, seq_len, num_nodes, seq_len).
          * **X_skip** (PyTorch FloatTensor) - Output feature tensor for skip connection,
              with shape (batch_size, in_dim, num_nodes, seq_len).
      """
      X_residual = X
      X_filter = self._filter_conv(X)
      X_filter = torch.tanh(X_filter)
      X_gate = self._gate_conv(X)
      X_gate = torch.sigmoid(X_gate)
      X = X_filter * X_gate
      X = F.dropout(X, self._dropout, training=training)
      X_skip = self._skip_conv(X) + X_skip
      if self._gcn_true:
          X = self._mixprop_conv1(X, A_tilde) + self._mixprop_conv2(
              X, A_tilde.transpose(1, 0)
          )
      else:
          X = self._residual_conv(X)
  
      X = X + X_residual[:, :, :, -X.size(3) :]
      X = self._normalization(X, idx)
      return X, X_skip
  
imports: from __future__ import division
  import numbers
  from typing import Optional
  import torch
  import torch.nn
  from torch.nn import init
  import torch.nn.functional
label_desc: Use image node_id 3 for calling the MTGNNLayer obj's underlying member method code with example usage: obj.forward(X, X_skip, A_tilde, idx, training) and returns: X,  X_skip