class_docstr: The self-supervised graph attentional operator from the `"How to Find
  Your Friendly Neighborhood: Graph Attention Design with Self-Supervision"
  <https://openreview.net/forum?id=Wi5KUNlqWty>`_ paper.
  
  .. math::
  
      \mathbf{x}^{\prime}_i = \alpha_{i,i}\mathbf{\Theta}\mathbf{x}_{i} +
      \sum_{j \in \mathcal{N}(i)} \alpha_{i,j}\mathbf{\Theta}\mathbf{x}_{j},
  
  where the two types of attention :math:`\alpha_{i,j}^{\mathrm{MX\ or\ SD}}`
  are computed as:
  
  .. math::
  
      \alpha_{i,j}^{\mathrm{MX\ or\ SD}} &=
      \frac{
      \exp\left(\mathrm{LeakyReLU}\left(
          e_{i,j}^{\mathrm{MX\ or\ SD}}
      \right)\right)}
      {\sum_{k \in \mathcal{N}(i) \cup \{ i \}}
      \exp\left(\mathrm{LeakyReLU}\left(
          e_{i,k}^{\mathrm{MX\ or\ SD}}
      \right)\right)}
  
      e_{i,j}^{\mathrm{MX}} &= \mathbf{a}^{\top}
          [\mathbf{\Theta}\mathbf{x}_i \, \Vert \,
           \mathbf{\Theta}\mathbf{x}_j]
          \cdot \sigma \left(
              \left( \mathbf{\Theta}\mathbf{x}_i \right)^{\top}
              \mathbf{\Theta}\mathbf{x}_j
          \right)
  
      e_{i,j}^{\mathrm{SD}} &= \frac{
          \left( \mathbf{\Theta}\mathbf{x}_i \right)^{\top}
          \mathbf{\Theta}\mathbf{x}_j
      }{ \sqrt{d} }
  
  The self-supervised task is a link prediction using the attention values
  as input to predict the likelihood :math:`\phi_{i,j}^{\mathrm{MX\ or\ SD}}`
  that an edge exists between nodes:
  
  .. math::
  
      \phi_{i,j}^{\mathrm{MX}} &= \sigma \left(
          \left( \mathbf{\Theta}\mathbf{x}_i \right)^{\top}
          \mathbf{\Theta}\mathbf{x}_j
      \right)
  
      \phi_{i,j}^{\mathrm{SD}} &= \sigma \left(
          \frac{
              \left( \mathbf{\Theta}\mathbf{x}_i \right)^{\top}
              \mathbf{\Theta}\mathbf{x}_j
          }{ \sqrt{d} }
      \right)
  
  .. note::
  
      For an example of using SuperGAT, see `examples/super_gat.py
      <https://github.com/pyg-team/pytorch_geometric/blob/master/examples/
      super_gat.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.
      heads (int, optional): Number of multi-head-attentions.
          (default: :obj:`1`)
      concat (bool, optional): If set to :obj:`False`, the multi-head
          attentions are averaged instead of concatenated.
          (default: :obj:`True`)
      negative_slope (float, optional): LeakyReLU angle of the negative
          slope. (default: :obj:`0.2`)
      dropout (float, optional): Dropout probability of the normalized
          attention coefficients which exposes each node to a stochastically
          sampled neighborhood during training. (default: :obj:`0`)
      add_self_loops (bool, optional): If set to :obj:`False`, will not add
          self-loops to the input graph. (default: :obj:`True`)
      bias (bool, optional): If set to :obj:`False`, the layer will not learn
          an additive bias. (default: :obj:`True`)
      attention_type (str, optional): Type of attention to use
          (:obj:`'MX'`, :obj:`'SD'`). (default: :obj:`'MX'`)
      neg_sample_ratio (float, optional): The ratio of the number of sampled
          negative edges to the number of positive edges.
          (default: :obj:`0.5`)
      edge_sample_ratio (float, optional): The ratio of samples to use for
          training among the number of training edges. (default: :obj:`1.0`)
      is_undirected (bool, optional): Whether the input graph is undirected.
          If not given, will be automatically computed with the input graph
          when negative sampling is performed. (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}|)`,
        negative edge indices :math:`(2, |\mathcal{E}^{(-)}|)` *(optional)*
      - **output:** node features :math:`(|\mathcal{V}|, H * F_{out})`
code: def reset_parameters(self):
      super().reset_parameters()
      self.lin.reset_parameters()
      glorot(self.att_l)
      glorot(self.att_r)
      zeros(self.bias)
  
imports: import math
  from typing import Optional
  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, zeros
  from torch_geometric.typing import Adj, OptTensor, SparseTensor, torch_sparse
  from torch_geometric.utils import add_self_loops, batched_negative_sampling, dropout_edge, is_undirected, negative_sampling, remove_self_loops, softmax, to_undirected
label_desc: Use image node_id 2 for calling the SuperGATConv obj's underlying member method code with example usage: obj.reset_parameters() without return types