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","."]
code: def __init__(
      self,
      dilation_exponential: int,
      rf_size_i: int,
      kernel_size: int,
      j: int,
      residual_channels: int,
      conv_channels: int,
      skip_channels: int,
      kernel_set: list,
      new_dilation: int,
      layer_norm_affline: bool,
      gcn_true: bool,
      seq_length: int,
      receptive_field: int,
      dropout: float,
      gcn_depth: int,
      num_nodes: int,
      propalpha: float,
  ):
      super(MTGNNLayer, self).__init__()
      self._dropout = dropout
      self._gcn_true = gcn_true
  
      if dilation_exponential > 1:
          rf_size_j = int(
              rf_size_i
              + (kernel_size - 1)
              * (dilation_exponential**j - 1)
              / (dilation_exponential - 1)
          )
      else:
          rf_size_j = rf_size_i + j * (kernel_size - 1)
  
      self._filter_conv = DilatedInception(
          residual_channels,
          conv_channels,
          kernel_set=kernel_set,
          dilation_factor=new_dilation,
      )
  
      self._gate_conv = DilatedInception(
          residual_channels,
          conv_channels,
          kernel_set=kernel_set,
          dilation_factor=new_dilation,
      )
  
      self._residual_conv = nn.Conv2d(
          in_channels=conv_channels,
          out_channels=residual_channels,
          kernel_size=(1, 1),
      )
  
      if seq_length > receptive_field:
          self._skip_conv = nn.Conv2d(
              in_channels=conv_channels,
              out_channels=skip_channels,
              kernel_size=(1, seq_length - rf_size_j + 1),
          )
      else:
          self._skip_conv = nn.Conv2d(
              in_channels=conv_channels,
              out_channels=skip_channels,
              kernel_size=(1, receptive_field - rf_size_j + 1),
          )
  
      if gcn_true:
          self._mixprop_conv1 = MixProp(
              conv_channels,
              residual_channels,
              gcn_depth,
              dropout,
              propalpha,
          )
  
          self._mixprop_conv2 = MixProp(
              conv_channels,
              residual_channels,
              gcn_depth,
              dropout,
              propalpha,
          )
  
      if seq_length > receptive_field:
          self._normalization = LayerNormalization(
              (
                  residual_channels,
                  num_nodes,
                  seq_length - rf_size_j + 1,
              ),
              elementwise_affine=layer_norm_affline,
          )
  
      else:
          self._normalization = LayerNormalization(
              (
                  residual_channels,
                  num_nodes,
                  receptive_field - rf_size_j + 1,
              ),
              elementwise_affine=layer_norm_affline,
          )
      self._reset_parameters()
  
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 1 to create a new MTGNNLayer object from inherited base classes: nn with example: obj = MTGNNLayer(dilation_exponential, rf_size_i, kernel_size, j, residual_channels, conv_channels, skip_channels, kernel_set, new_dilation, layer_norm_affline, gcn_true, seq_length, receptive_field, dropout, gcn_depth, num_nodes, propalpha)