Skip to content

Commit

Permalink
Fix GATConv documentation (#9360)
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1s authored May 26, 2024
1 parent d5131be commit d3ce05c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions torch_geometric/nn/conv/gat_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ class GATConv(MessagePassing):
<https://arxiv.org/abs/1710.10903>`_ paper.
.. math::
\mathbf{x}^{\prime}_i = \alpha_{i,i}\mathbf{\Theta}_{s}\mathbf{x}_{i} +
\sum_{j \in \mathcal{N}(i)}
\alpha_{i,j}\mathbf{\Theta}_{t}\mathbf{x}_{j},
\mathbf{x}^{\prime}_i = \sum_{j \in \mathcal{N}(i) \cup \{ i \}}
\alpha_{i,j}\mathbf{\Theta}_t\mathbf{x}_{j},
where the attention coefficients :math:`\alpha_{i,j}` are computed as
Expand Down
3 changes: 1 addition & 2 deletions torch_geometric/nn/conv/gatv2_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ class GATv2Conv(MessagePassing):
In contrast, in :class:`GATv2`, every node can attend to any other node.
.. math::
\mathbf{x}^{\prime}_i = \alpha_{i,i}\mathbf{\Theta}_{s}\mathbf{x}_{i} +
\sum_{j \in \mathcal{N}(i)}
\mathbf{x}^{\prime}_i = \sum_{j \in \mathcal{N}(i) \cup \{ i \}}
\alpha_{i,j}\mathbf{\Theta}_{t}\mathbf{x}_{j},
where the attention coefficients :math:`\alpha_{i,j}` are computed as
Expand Down
2 changes: 1 addition & 1 deletion torch_geometric/nn/models/lightgcn.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ class BPRLoss(_Loss):
\sum_{j \not\in \mathcal{N}_u} \ln \sigma(\hat{y}_{ui} - \hat{y}_{uj})
+ \lambda \vert\vert \textbf{x}^{(0)} \vert\vert^2
where :math:`lambda` controls the :math:`L_2` regularization strength.
where :math:`\lambda` controls the :math:`L_2` regularization strength.
We compute the mean BPR loss for simplicity.
Args:
Expand Down

0 comments on commit d3ce05c

Please sign in to comment.