class_docstr: The ARMA graph convolutional operator from the `"Graph Neural Networks
  with Convolutional ARMA Filters" <https://arxiv.org/abs/1901.01343>`_ paper
  
  .. math::
      \mathbf{X}^{\prime} = \frac{1}{K} \sum_{k=1}^K \mathbf{X}_k^{(T)},
  
  with :math:`\mathbf{X}_k^{(T)}` being recursively defined by
  
  .. math::
      \mathbf{X}_k^{(t+1)} = \sigma \left( \mathbf{\hat{L}}
      \mathbf{X}_k^{(t)} \mathbf{W} + \mathbf{X}^{(0)} \mathbf{V} \right),
  
  where :math:`\mathbf{\hat{L}} = \mathbf{I} - \mathbf{L} = \mathbf{D}^{-1/2}
  \mathbf{A} \mathbf{D}^{-1/2}` denotes the
  modified Laplacian :math:`\mathbf{L} = \mathbf{I} - \mathbf{D}^{-1/2}
  \mathbf{A} \mathbf{D}^{-1/2}`.
  
  Args:
      in_channels (int): Size of each input sample :math:`\mathbf{x}^{(t)}`.
      out_channels (int): Size of each output sample
          :math:`\mathbf{x}^{(t+1)}`.
      num_stacks (int, optional): Number of parallel stacks :math:`K`.
          (default: :obj:`1`).
      num_layers (int, optional): Number of layers :math:`T`.
          (default: :obj:`1`)
      act (callable, optional): Activation function :math:`\sigma`.
          (default: :meth:`torch.nn.functional.ReLU`)
      shared_weights (int, optional): If set to :obj:`True` the layers in
          each stack will share the same parameters. (default: :obj:`False`)
      dropout (float, optional): Dropout probability of the skip connection.
          (default: :obj:`0.`)
      bias (bool, optional): If set to :obj:`False`, the layer will not learn
          an additive bias. (default: :obj:`True`)
      **kwargs (optional): Additional arguments of
          :class:`torch_geometric.nn.conv.MessagePassing`.
class_docstr_tok: ["The","ARMA","graph","convolutional","operator","from","the","`","``","Graph","Neural","Networks","with","Convolutional","ARMA","Filters","''","<","https",":","\/\/arxiv.org\/abs\/1901.01343",">","`","_","paper","..","math",":",":","\\mathbf","{","X","}","^","{","\\prime","}","=","\\frac","{","1","}","{","K","}","\\sum_","{","k=1","}","^K","\\mathbf","{","X","}","_k^","{","(","T",")","}",",","with",":","math",":","`","\\mathbf","{","X","}","_k^","{","(","T",")","}","`","being","recursively","defined","by","..","math",":",":","\\mathbf","{","X","}","_k^","{","(","t+1",")","}","=","\\sigma","\\left","(","\\mathbf","{","\\hat","{","L","}","}","\\mathbf","{","X","}","_k^","{","(","t",")","}","\\mathbf","{","W","}","+","\\mathbf","{","X","}","^","{","(","0",")","}","\\mathbf","{","V","}","\\right",")",",","where",":","math",":","`","\\mathbf","{","\\hat","{","L","}","}","=","\\mathbf","{","I","}","-","\\mathbf","{","L","}","=","\\mathbf","{","D","}","^","{","-1\/2","}","\\mathbf","{","A","}","\\mathbf","{","D","}","^","{","-1\/2","}","`","denotes","the","modified","Laplacian",":","math",":","`","\\mathbf","{","L","}","=","\\mathbf","{","I","}","-","\\mathbf","{","D","}","^","{","-1\/2","}","\\mathbf","{","A","}","\\mathbf","{","D","}","^","{","-1\/2","}","`",".","Args",":","in_channels","(","int",")",":","Size","of","each","input","sample",":","math",":","`","\\mathbf","{","x","}","^","{","(","t",")","}","`",".","out_channels","(","int",")",":","Size","of","each","output","sample",":","math",":","`","\\mathbf","{","x","}","^","{","(","t+1",")","}","`",".","num_stacks","(","int",",","optional",")",":","Number","of","parallel","stacks",":","math",":","`","K","`",".","(","default",":",":","obj",":","`","1","`",")",".","num_layers","(","int",",","optional",")",":","Number","of","layers",":","math",":","`","T","`",".","(","default",":",":","obj",":","`","1","`",")","act","(","callable",",","optional",")",":","Activation","function",":","math",":","`","\\sigma","`",".","(","default",":",":","meth",":","`","torch.nn.functional.ReLU","`",")","shared_weights","(","int",",","optional",")",":","If","set","to",":","obj",":","`","True","`","the","layers","in","each","stack","will","share","the","same","parameters",".","(","default",":",":","obj",":","`","False","`",")","dropout","(","float",",","optional",")",":","Dropout","probability","of","the","skip","connection",".","(","default",":",":","obj",":","`","0.","`",")","bias","(","bool",",","optional",")",":","If","set","to",":","obj",":","`","False","`",",","the","layer","will","not","learn","an","additive","bias",".","(","default",":",":","obj",":","`","True","`",")","*","*","kwargs","(","optional",")",":","Additional","arguments","of",":","class",":","`","torch_geometric.nn.conv.MessagePassing","`","."]
code: def __init__(
      self,
      in_channels: int,
      out_channels: int,
      num_stacks: int = 1,
      num_layers: int = 1,
      shared_weights: bool = False,
      act: Callable = F.relu,
      normalize=True,
      dropout: float = 0.0,
      bias: bool = True,
      **kwargs,
  ):
      kwargs.setdefault("aggr", "add")
      super(ARMAConv, self).__init__(**kwargs)
  
      self.in_channels = in_channels
      self.out_channels = out_channels
      self.num_stacks = num_stacks
      self.num_layers = num_layers
      self.act = act
      self.shared_weights = shared_weights
      self.dropout = dropout
      self.normalize = normalize
  
      K, T, F_in, F_out = (
          num_stacks,
          num_layers,
          in_channels,
          out_channels,
      )
      T = 1 if self.shared_weights else T
  
      self.init_weight = Parameter(torch.Tensor(K, F_in, F_out))
      self.weight = Parameter(
          torch.Tensor(max(1, T - 1), K, F_out, F_out)
      )
      self.root_weight = Parameter(torch.Tensor(T, K, F_in, F_out))
  
      if bias:
          self.bias = Parameter(torch.Tensor(T, K, 1, F_out))
      else:
          self.register_parameter("bias", None)
  
      self.reset_parameters()
  
file_path: AutoGL/autogl/module/nas/space/gasso_space/arma_conv.py
imports: from typing import Callable
  from torch_geometric.typing import Adj, OptTensor
  import torch
  from torch import Tensor
  from torch.nn import Parameter
  import torch.nn.functional
  from torch_sparse import SparseTensor, matmul
  from torch_geometric.nn.conv import MessagePassing
  from torch_geometric.nn.conv.gcn_conv import gcn_norm
  from .inits import glorot, zeros
label_desc: Use image node_id 1 to create a new ARMAConv object from inherited base classes: MessagePassing with example: obj = ARMAConv(in_channels, out_channels, num_stacks, num_layers, shared_weights, act, normalize, dropout, bias)