class_docstr: The chebyshev spectral graph convolutional operator from the
  `"Convolutional Neural Networks on Graphs with Fast Localized Spectral
  Filtering" <https://arxiv.org/abs/1606.09375>`_ paper
  
  .. math::
      \mathbf{X}^{\prime} = \sum_{k=1}^{K} \mathbf{Z}^{(k)} \cdot
      \mathbf{\Theta}^{(k)}
  
  where :math:`\mathbf{Z}^{(k)}` is computed recursively by
  
  .. math::
      \mathbf{Z}^{(1)} &= \mathbf{X}
  
      \mathbf{Z}^{(2)} &= \mathbf{\hat{L}} \cdot \mathbf{X}
  
      \mathbf{Z}^{(k)} &= 2 \cdot \mathbf{\hat{L}} \cdot
      \mathbf{Z}^{(k-1)} - \mathbf{Z}^{(k-2)}
  
  and :math:`\mathbf{\hat{L}}` denotes the scaled and normalized Laplacian
  :math:`\frac{2\mathbf{L}}{\lambda_{\max}} - \mathbf{I}`.
  
  Args:
      in_channels (int): Size of each input sample.
      out_channels (int): Size of each output sample.
      K (int): Chebyshev filter size :math:`K`.
      normalization (str, optional): The normalization scheme for the graph
          Laplacian (default: :obj:`"sym"`):
  
          1. :obj:`None`: No normalization
          :math:`\mathbf{L} = \mathbf{D} - \mathbf{A}`
  
          2. :obj:`"sym"`: Symmetric normalization
          :math:`\mathbf{L} = \mathbf{I} - \mathbf{D}^{-1/2} \mathbf{A}
          \mathbf{D}^{-1/2}`
  
          3. :obj:`"rw"`: Random-walk normalization
          :math:`\mathbf{L} = \mathbf{I} - \mathbf{D}^{-1} \mathbf{A}`
  
          You need to pass :obj:`lambda_max` to the :meth:`forward` method of
          this operator in case the normalization is non-symmetric.
          :obj:`\lambda_max` should be a :class:`torch.Tensor` of size
          :obj:`[num_graphs]` in a mini-batch scenario and a
          scalar/zero-dimensional tensor when operating on single graphs.
          You can pre-compute :obj:`lambda_max` via the
          :class:`torch_geometric.transforms.LaplacianLambdaMax` transform.
      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","chebyshev","spectral","graph","convolutional","operator","from","the","`","``","Convolutional","Neural","Networks","on","Graphs","with","Fast","Localized","Spectral","Filtering","''","<","https",":","\/\/arxiv.org\/abs\/1606.09375",">","`","_","paper","..","math",":",":","\\mathbf","{","X","}","^","{","\\prime","}","=","\\sum_","{","k=1","}","^","{","K","}","\\mathbf","{","Z","}","^","{","(","k",")","}","\\cdot","\\mathbf","{","\\Theta","}","^","{","(","k",")","}","where",":","math",":","`","\\mathbf","{","Z","}","^","{","(","k",")","}","`","is","computed","recursively","by","..","math",":",":","\\mathbf","{","Z","}","^","{","(","1",")","}","&","=","\\mathbf","{","X","}","\\mathbf","{","Z","}","^","{","(","2",")","}","&","=","\\mathbf","{","\\hat","{","L","}","}","\\cdot","\\mathbf","{","X","}","\\mathbf","{","Z","}","^","{","(","k",")","}","&","=","2","\\cdot","\\mathbf","{","\\hat","{","L","}","}","\\cdot","\\mathbf","{","Z","}","^","{","(","k-1",")","}","-","\\mathbf","{","Z","}","^","{","(","k-2",")","}","and",":","math",":","`","\\mathbf","{","\\hat","{","L","}","}","`","denotes","the","scaled","and","normalized","Laplacian",":","math",":","`","\\frac","{","2\\mathbf","{","L","}","}","{","\\lambda_","{","\\max","}","}","-","\\mathbf","{","I","}","`",".","Args",":","in_channels","(","int",")",":","Size","of","each","input","sample",".","out_channels","(","int",")",":","Size","of","each","output","sample",".","K","(","int",")",":","Chebyshev","filter","size",":","math",":","`","K","`",".","normalization","(","str",",","optional",")",":","The","normalization","scheme","for","the","graph","Laplacian","(","default",":",":","obj",":","`","``","sym","''","`",")",":","1.",":","obj",":","`","None","`",":","No","normalization",":","math",":","`","\\mathbf","{","L","}","=","\\mathbf","{","D","}","-","\\mathbf","{","A","}","`","2.",":","obj",":","`","``","sym","''","`",":","Symmetric","normalization",":","math",":","`","\\mathbf","{","L","}","=","\\mathbf","{","I","}","-","\\mathbf","{","D","}","^","{","-1\/2","}","\\mathbf","{","A","}","\\mathbf","{","D","}","^","{","-1\/2","}","`","3.",":","obj",":","`","``","rw","''","`",":","Random-walk","normalization",":","math",":","`","\\mathbf","{","L","}","=","\\mathbf","{","I","}","-","\\mathbf","{","D","}","^","{","-1","}","\\mathbf","{","A","}","`","You","need","to","pass",":","obj",":","`","lambda_max","`","to","the",":","meth",":","`","forward","`","method","of","this","operator","in","case","the","normalization","is","non-symmetric",".",":","obj",":","`","\\lambda_max","`","should","be","a",":","class",":","`","torch.Tensor","`","of","size",":","obj",":","`","[","num_graphs","]","`","in","a","mini-batch","scenario","and","a","scalar\/zero-dimensional","tensor","when","operating","on","single","graphs",".","You","can","pre-compute",":","obj",":","`","lambda_max","`","via","the",":","class",":","`","torch_geometric.transforms.LaplacianLambdaMax","`","transform",".","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,
      out_channels,
      K,
      normalization="sym",
      bias=True,
      **kwargs,
  ):
      kwargs.setdefault("aggr", "add")
      super(ChebConv, self).__init__(**kwargs)
  
      assert K > 0
      assert normalization in [
          None,
          "sym",
          "rw",
      ], "Invalid normalization"
  
      self.in_channels = in_channels
      self.out_channels = out_channels
      self.normalization = normalization
      self.weight = Parameter(
          torch.Tensor(K, in_channels, out_channels)
      )
  
      if bias:
          self.bias = Parameter(torch.Tensor(out_channels))
      else:
          self.register_parameter("bias", None)
  
      self.reset_parameters()
  
file_path: AutoGL/autogl/module/nas/space/gasso_space/cheb_conv.py
imports: from typing import Optional
  from torch_geometric.typing import OptTensor
  import torch
  from torch.nn import Parameter
  from torch_geometric.nn.conv import MessagePassing
  from torch_geometric.utils import remove_self_loops, add_self_loops
  from torch_geometric.utils import get_laplacian
  from .inits import glorot, zeros
label_desc: Use image node_id 1 to create a new ChebConv object from inherited base classes: MessagePassing with example: obj = ChebConv(in_channels, out_channels, K, normalization, bias)