class_docstr: Graph attention layer that handles edge features from `Rossmann-Toolbox
  <https://pubmed.ncbi.nlm.nih.gov/34571541/>`__ (see supplementary data)
  
  The difference lies in how unnormalized attention scores :math:`e_{ij}` are obtained:
  
  .. math::
      e_{ij} &= \vec{F} (f_{ij}^{\prime})
  
      f_{ij}^{\prime} &= \mathrm{LeakyReLU}\left(A [ h_{i} \| f_{ij} \| h_{j}]\right)
  
  where :math:`f_{ij}^{\prime}` are edge features, :math:`\mathrm{A}` is weight matrix and
  :math:`\vec{F}` is weight vector. After that, resulting node features
  :math:`h_{i}^{\prime}` are updated in the same way as in regular GAT.
  
  Parameters
  ----------
  in_node_feats : int, or pair of ints
      Input feature size; i.e, the number of dimensions of :math:`h_{i}`.
      EGATConv can be applied on homogeneous graph and unidirectional
      `bipartite graph <https://docs.dgl.ai/generated/dgl.bipartite.html?highlight=bipartite>`__.
      If the layer is to be applied to a unidirectional bipartite graph, ``in_feats``
      specifies the input feature size on both the source and destination nodes.  If
      a scalar is given, the source and destination node feature size would take the
      same value.
  in_edge_feats : int
      Input edge feature size :math:`f_{ij}`.
  out_node_feats : int
      Output node feature size.
  out_edge_feats : int
      Output edge feature size :math:`f_{ij}^{\prime}`.
  num_heads : int
      Number of attention heads.
  bias : bool, optional
      If True, add bias term to :math:`f_{ij}^{\prime}`. Defaults: ``True``.
  
  Examples
  ----------
  >>> import dgl
  >>> import torch as th
  >>> from dgl.nn import EGATConv
  
  >>> # Case 1: Homogeneous graph
  >>> num_nodes, num_edges = 8, 30
  >>> # generate a graph
  >>> graph = dgl.rand_graph(num_nodes,num_edges)
  >>> node_feats = th.rand((num_nodes, 20))
  >>> edge_feats = th.rand((num_edges, 12))
  >>> egat = EGATConv(in_node_feats=20,
  ...                 in_edge_feats=12,
  ...                 out_node_feats=15,
  ...                 out_edge_feats=10,
  ...                 num_heads=3)
  >>> #forward pass
  >>> new_node_feats, new_edge_feats = egat(graph, node_feats, edge_feats)
  >>> new_node_feats.shape, new_edge_feats.shape
  torch.Size([8, 3, 15]) torch.Size([30, 3, 10])
  
  >>> # Case 2: Unidirectional bipartite graph
  >>> u = [0, 1, 0, 0, 1]
  >>> v = [0, 1, 2, 3, 2]
  >>> g = dgl.heterograph({('A', 'r', 'B'): (u, v)})
  >>> u_feat = th.tensor(np.random.rand(2, 25).astype(np.float32))
  >>> v_feat = th.tensor(np.random.rand(4, 30).astype(np.float32))
  >>> nfeats = (u_feat,v_feat)
  >>> efeats = th.tensor(np.random.rand(5, 15).astype(np.float32))
  >>> in_node_feats = (25,30)
  >>> in_edge_feats = 15
  >>> out_node_feats = 10
  >>> out_edge_feats = 5
  >>> num_heads = 3
  >>> egat_model =  EGATConv(in_node_feats,
  ...                        in_edge_feats,
  ...                        out_node_feats,
  ...                        out_edge_feats,
  ...                        num_heads,
  ...                        bias=True)
  >>> #forward pass
  >>> new_node_feats,
  >>> new_edge_feats,
  >>> attentions = egat_model(g, nfeats, efeats, get_attention=True)
  >>> new_node_feats.shape, new_edge_feats.shape, attentions.shape
  (torch.Size([4, 3, 10]), torch.Size([5, 3, 5]), torch.Size([5, 3, 1]))
docstr: Reinitialize learnable parameters.
code: def reset_parameters(self):
      """
      Reinitialize learnable parameters.
      """
      gain = init.calculate_gain("relu")
      init.xavier_normal_(self.fc_node_src.weight, gain=gain)
      init.xavier_normal_(self.fc_ni.weight, gain=gain)
      init.xavier_normal_(self.fc_fij.weight, gain=gain)
      init.xavier_normal_(self.fc_nj.weight, gain=gain)
      init.xavier_normal_(self.attn, gain=gain)
      init.constant_(self.bias, 0)
  
file_path: dgl/python/dgl/nn/pytorch/conv/egatconv.py
imports: import torch
  from torch import nn
  from torch.nn import init
  from ....None import function
  from ....base import DGLError
  from ....utils import expand_as_pair
  from ...functional import edge_softmax
label_desc: Use image node_id 2 for calling the EGATConv obj's underlying member method code with example usage: obj.reset_parameters() without return types