class_docstr: A general GNN layer adapted from the `"Design Space for Graph Neural
  Networks" <https://arxiv.org/abs/2011.08843>`_ paper.
  
  Args:
      in_channels (int or tuple): Size of each input sample, or :obj:`-1` to
          derive the size from the first input(s) to the forward method.
          A tuple corresponds to the sizes of source and target
          dimensionalities.
      out_channels (int): Size of each output sample.
      in_edge_channels (int, optional): Size of each input edge.
          (default: :obj:`None`)
      aggr (str, optional): The aggregation scheme to use
          (:obj:`"add"`, :obj:`"mean"`, :obj:`"max"`).
          (default: :obj:`"mean"`)
      skip_linear (bool, optional): Whether apply linear function in skip
          connection. (default: :obj:`False`)
      directed_msg (bool, optional): If message passing is directed;
          otherwise, message passing is bi-directed. (default: :obj:`True`)
      heads (int, optional): Number of message passing ensembles.
          If :obj:`heads > 1`, the GNN layer will output an ensemble of
          multiple messages.
          If attention is used (:obj:`attention=True`), this corresponds to
          multi-head attention. (default: :obj:`1`)
      attention (bool, optional): Whether to add attention to message
          computation. (default: :obj:`False`)
      attention_type (str, optional): Type of attention: :obj:`"additive"`,
          :obj:`"dot_product"`. (default: :obj:`"additive"`)
      l2_normalize (bool, optional): If set to :obj:`True`, output features
          will be :math:`\ell_2`-normalized, *i.e.*,
          :math:`\frac{\mathbf{x}^{\prime}_i}
          {\| \mathbf{x}^{\prime}_i \|_2}`.
          (default: :obj:`False`)
      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`.
  
  Shapes:
      - **input:**
        node features :math:`(|\mathcal{V}|, F_{in})` or
        :math:`((|\mathcal{V_s}|, F_{s}), (|\mathcal{V_t}|, F_{t}))`
        if bipartite,
        edge indices :math:`(2, |\mathcal{E}|)`,
        edge attributes :math:`(|\mathcal{E}|, D)` *(optional)*
      - **output:** node features :math:`(|\mathcal{V}|, F_{out})` or
        :math:`(|\mathcal{V}_t|, F_{out})` if bipartite
class_docstr_tok: ["A","general","GNN","layer","adapted","from","the","`","``","Design","Space","for","Graph","Neural","Networks","''","<","https",":","\/\/arxiv.org\/abs\/2011.08843",">","`","_","paper",".","Args",":","in_channels","(","int","or","tuple",")",":","Size","of","each","input","sample",",","or",":","obj",":","`","-1","`","to","derive","the","size","from","the","first","input","(","s",")","to","the","forward","method",".","A","tuple","corresponds","to","the","sizes","of","source","and","target","dimensionalities",".","out_channels","(","int",")",":","Size","of","each","output","sample",".","in_edge_channels","(","int",",","optional",")",":","Size","of","each","input","edge",".","(","default",":",":","obj",":","`","None","`",")","aggr","(","str",",","optional",")",":","The","aggregation","scheme","to","use","(",":","obj",":","`","``","add","''","`",",",":","obj",":","`","``","mean","''","`",",",":","obj",":","`","``","max","''","`",")",".","(","default",":",":","obj",":","`","``","mean","''","`",")","skip_linear","(","bool",",","optional",")",":","Whether","apply","linear","function","in","skip","connection",".","(","default",":",":","obj",":","`","False","`",")","directed_msg","(","bool",",","optional",")",":","If","message","passing","is","directed",";","otherwise",",","message","passing","is","bi-directed",".","(","default",":",":","obj",":","`","True","`",")","heads","(","int",",","optional",")",":","Number","of","message","passing","ensembles",".","If",":","obj",":","`","heads",">","1","`",",","the","GNN","layer","will","output","an","ensemble","of","multiple","messages",".","If","attention","is","used","(",":","obj",":","`","attention=True","`",")",",","this","corresponds","to","multi-head","attention",".","(","default",":",":","obj",":","`","1","`",")","attention","(","bool",",","optional",")",":","Whether","to","add","attention","to","message","computation",".","(","default",":",":","obj",":","`","False","`",")","attention_type","(","str",",","optional",")",":","Type","of","attention",":",":","obj",":","`","``","additive","''","`",",",":","obj",":","`","``","dot_product","''","`",".","(","default",":",":","obj",":","`","``","additive","''","`",")","l2_normalize","(","bool",",","optional",")",":","If","set","to",":","obj",":","`","True","`",",","output","features","will","be",":","math",":","`","\\ell_2","`","-normalized",",","*","i.e",".","*",",",":","math",":","`","\\frac","{","\\mathbf","{","x","}","^","{","\\prime","}","_i","}","{","\\|","\\mathbf","{","x","}","^","{","\\prime","}","_i","\\|_2","}","`",".","(","default",":",":","obj",":","`","False","`",")","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","`",".","Shapes",":","-","*","*","input",":","*","*","node","features",":","math",":","`","(","|\\mathcal","{","V","}","|",",","F_","{","in","}",")","`","or",":","math",":","`","(","(","|\\mathcal","{","V_s","}","|",",","F_","{","s","}",")",",","(","|\\mathcal","{","V_t","}","|",",","F_","{","t","}",")",")","`","if","bipartite",",","edge","indices",":","math",":","`","(","2",",","|\\mathcal","{","E","}","|",")","`",",","edge","attributes",":","math",":","`","(","|\\mathcal","{","E","}","|",",","D",")","`","*","(","optional",")","*","-","*","*","output",":","*","*","node","features",":","math",":","`","(","|\\mathcal","{","V","}","|",",","F_","{","out","}",")","`","or",":","math",":","`","(","|\\mathcal","{","V","}","_t|",",","F_","{","out","}",")","`","if","bipartite"]
code: def reset_parameters(self):
      super().reset_parameters()
      self.lin_msg.reset_parameters()
      if hasattr(self.lin_self, "reset_parameters"):
          self.lin_self.reset_parameters()
      if self.in_edge_channels is not None:
          self.lin_edge.reset_parameters()
      if self.attention and self.attention_type == "additive":
          glorot(self.att_msg)
  
file_path: pytorch_geometric/torch_geometric/nn/conv/general_conv.py
imports: from typing import Tuple, Union
  import torch
  import torch.nn.functional
  from torch import Tensor
  from torch.nn import Parameter
  from torch_geometric.nn.conv import MessagePassing
  from torch_geometric.nn.dense.linear import Linear
  from torch_geometric.nn.inits import glorot
  from torch_geometric.typing import Adj, Optional, OptPairTensor, OptTensor, Size
  from torch_geometric.utils import softmax
label_desc: Use image node_id 2 for calling the GeneralConv obj's underlying member method code with example usage: obj.reset_parameters() without return types