class_docstr: The Principal Neighbourhood Aggregation graph convolution operator
  from the `"Principal Neighbourhood Aggregation for Graph Nets"
  <https://arxiv.org/abs/2004.05718>`_ paper.
  
  .. math::
      \mathbf{x}_i^{\prime} = \gamma_{\mathbf{\Theta}} \left(
      \mathbf{x}_i, \underset{j \in \mathcal{N}(i)}{\bigoplus}
      h_{\mathbf{\Theta}} \left( \mathbf{x}_i, \mathbf{x}_j \right)
      \right)
  
  with
  
  .. math::
      \bigoplus = \underbrace{\begin{bmatrix}
          1 \\
          S(\mathbf{D}, \alpha=1) \\
          S(\mathbf{D}, \alpha=-1)
      \end{bmatrix} }_{\text{scalers}}
      \otimes \underbrace{\begin{bmatrix}
          \mu \\
          \sigma \\
          \max \\
          \min
      \end{bmatrix}}_{\text{aggregators}},
  
  where :math:`\gamma_{\mathbf{\Theta}}` and :math:`h_{\mathbf{\Theta}}`
  denote MLPs.
  
  .. note::
  
      For an example of using :obj:`PNAConv`, see `examples/pna.py
      <https://github.com/pyg-team/pytorch_geometric/blob/master/
      examples/pna.py>`_.
  
  Args:
      in_channels (int): Size of each input sample, or :obj:`-1` to derive
          the size from the first input(s) to the forward method.
      out_channels (int): Size of each output sample.
      aggregators (List[str]): Set of aggregation function identifiers,
          namely :obj:`"sum"`, :obj:`"mean"`, :obj:`"min"`, :obj:`"max"`,
          :obj:`"var"` and :obj:`"std"`.
      scalers (List[str]): Set of scaling function identifiers, namely
          :obj:`"identity"`, :obj:`"amplification"`,
          :obj:`"attenuation"`, :obj:`"linear"` and
          :obj:`"inverse_linear"`.
      deg (torch.Tensor): Histogram of in-degrees of nodes in the training
          set, used by scalers to normalize.
      edge_dim (int, optional): Edge feature dimensionality (in case
          there are any). (default :obj:`None`)
      towers (int, optional): Number of towers (default: :obj:`1`).
      pre_layers (int, optional): Number of transformation layers before
          aggregation (default: :obj:`1`).
      post_layers (int, optional): Number of transformation layers after
          aggregation (default: :obj:`1`).
      divide_input (bool, optional): Whether the input features should
          be split between towers or not (default: :obj:`False`).
      act (str or callable, optional): Pre- and post-layer activation
          function to use. (default: :obj:`"relu"`)
      act_kwargs (Dict[str, Any], optional): Arguments passed to the
          respective activation function defined by :obj:`act`.
          (default: :obj:`None`)
      train_norm (bool, optional): Whether normalization parameters
          are trainable. (default: :obj:`False`)
      **kwargs (optional): Additional arguments of
          :class:`torch_geometric.nn.conv.MessagePassing`.
  
  Shapes:
      - **input:**
        node features :math:`(|\mathcal{V}|, F_{in})`,
        edge indices :math:`(2, |\mathcal{E}|)`,
        edge features :math:`(|\mathcal{E}|, D)` *(optional)*
      - **output:** node features :math:`(|\mathcal{V}|, F_{out})`
class_docstr_tok: ["The","Principal","Neighbourhood","Aggregation","graph","convolution","operator","from","the","`","``","Principal","Neighbourhood","Aggregation","for","Graph","Nets","''","<","https",":","\/\/arxiv.org\/abs\/2004.05718",">","`","_","paper",".","..","math",":",":","\\mathbf","{","x","}","_i^","{","\\prime","}","=","\\gamma_","{","\\mathbf","{","\\Theta","}","}","\\left","(","\\mathbf","{","x","}","_i",",","\\underset","{","j","\\in","\\mathcal","{","N","}","(","i",")","}","{","\\bigoplus","}","h_","{","\\mathbf","{","\\Theta","}","}","\\left","(","\\mathbf","{","x","}","_i",",","\\mathbf","{","x","}","_j","\\right",")","\\right",")","with","..","math",":",":","\\bigoplus","=","\\underbrace","{","\\begin","{","bmatrix","}","1","\\\\","S","(","\\mathbf","{","D","}",",","\\alpha=1",")","\\\\","S","(","\\mathbf","{","D","}",",","\\alpha=-1",")","\\end","{","bmatrix","}","}","_","{","\\text","{","scalers","}","}","\\otimes","\\underbrace","{","\\begin","{","bmatrix","}","\\mu","\\\\","\\sigma","\\\\","\\max","\\\\","\\min","\\end","{","bmatrix","}","}","_","{","\\text","{","aggregators","}","}",",","where",":","math",":","`","\\gamma_","{","\\mathbf","{","\\Theta","}","}","`","and",":","math",":","`","h_","{","\\mathbf","{","\\Theta","}","}","`","denote","MLPs",".","..","note",":",":","For","an","example","of","using",":","obj",":","`","PNAConv","`",",","see","`","examples\/pna.py","<","https",":","\/\/github.com\/pyg-team\/pytorch_geometric\/blob\/master\/","examples\/pna.py",">","`","_",".","Args",":","in_channels","(","int",")",":","Size","of","each","input","sample",",","or",":","obj",":","`","-1","`","to","derive","the","size","from","the","first","input","(","s",")","to","the","forward","method",".","out_channels","(","int",")",":","Size","of","each","output","sample",".","aggregators","(","List","[","str","]",")",":","Set","of","aggregation","function","identifiers",",","namely",":","obj",":","`","``","sum","''","`",",",":","obj",":","`","``","mean","''","`",",",":","obj",":","`","``","min","''","`",",",":","obj",":","`","``","max","''","`",",",":","obj",":","`","``","var","''","`","and",":","obj",":","`","``","std","''","`",".","scalers","(","List","[","str","]",")",":","Set","of","scaling","function","identifiers",",","namely",":","obj",":","`","``","identity","''","`",",",":","obj",":","`","``","amplification","''","`",",",":","obj",":","`","``","attenuation","''","`",",",":","obj",":","`","``","linear","''","`","and",":","obj",":","`","``","inverse_linear","''","`",".","deg","(","torch.Tensor",")",":","Histogram","of","in-degrees","of","nodes","in","the","training","set",",","used","by","scalers","to","normalize",".","edge_dim","(","int",",","optional",")",":","Edge","feature","dimensionality","(","in","case","there","are","any",")",".","(","default",":","obj",":","`","None","`",")","towers","(","int",",","optional",")",":","Number","of","towers","(","default",":",":","obj",":","`","1","`",")",".","pre_layers","(","int",",","optional",")",":","Number","of","transformation","layers","before","aggregation","(","default",":",":","obj",":","`","1","`",")",".","post_layers","(","int",",","optional",")",":","Number","of","transformation","layers","after","aggregation","(","default",":",":","obj",":","`","1","`",")",".","divide_input","(","bool",",","optional",")",":","Whether","the","input","features","should","be","split","between","towers","or","not","(","default",":",":","obj",":","`","False","`",")",".","act","(","str","or","callable",",","optional",")",":","Pre-","and","post-layer","activation","function","to","use",".","(","default",":",":","obj",":","`","``","relu","''","`",")","act_kwargs","(","Dict","[","str",",","Any","]",",","optional",")",":","Arguments","passed","to","the","respective","activation","function","defined","by",":","obj",":","`","act","`",".","(","default",":",":","obj",":","`","None","`",")","train_norm","(","bool",",","optional",")",":","Whether","normalization","parameters","are","trainable",".","(","default",":",":","obj",":","`","False","`",")","*","*","kwargs","(","optional",")",":","Additional","arguments","of",":","class",":","`","torch_geometric.nn.conv.MessagePassing","`",".","Shapes",":","-","*","*","input",":","*","*","node","features",":","math",":","`","(","|\\mathcal","{","V","}","|",",","F_","{","in","}",")","`",",","edge","indices",":","math",":","`","(","2",",","|\\mathcal","{","E","}","|",")","`",",","edge","features",":","math",":","`","(","|\\mathcal","{","E","}","|",",","D",")","`","*","(","optional",")","*","-","*","*","output",":","*","*","node","features",":","math",":","`","(","|\\mathcal","{","V","}","|",",","F_","{","out","}",")","`"]
code: def forward(
      self, x: Tensor, edge_index: Adj, edge_attr: OptTensor = None
  ) -> Tensor:
      if self.divide_input:
          x = x.view(-1, self.towers, self.F_in)
      else:
          x = x.view(-1, 1, self.F_in).repeat(1, self.towers, 1)
  
      # propagate_type: (x: Tensor, edge_attr: OptTensor)
      out = self.propagate(edge_index, x=x, edge_attr=edge_attr)
  
      out = torch.cat([x, out], dim=-1)
      outs = [nn(out[:, i]) for i, nn in enumerate(self.post_nns)]
      out = torch.cat(outs, dim=1)
  
      return self.lin(out)
  
file_path: pytorch_geometric/torch_geometric/nn/conv/pna_conv.py
imports: from typing import Any, Callable, Dict, List, Optional, Union
  import torch
  from torch import Tensor
  from torch.nn import ModuleList, Sequential
  from torch.utils.data import DataLoader
  from torch_geometric.nn.aggr import DegreeScalerAggregation
  from torch_geometric.nn.conv import MessagePassing
  from torch_geometric.nn.dense.linear import Linear
  from torch_geometric.nn.inits import reset
  from torch_geometric.nn.resolver import activation_resolver
  from torch_geometric.typing import Adj, OptTensor
  from torch_geometric.utils import degree
label_desc: Use image node_id 3 for calling the PNAConv obj's underlying member method code with example usage: obj.forward(x, edge_index, edge_attr) and returns: self