Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
9cc85aed
Unverified
Commit
9cc85aed
authored
Aug 25, 2021
by
Rhett Ying
Committed by
GitHub
Aug 25, 2021
Browse files
[Doc] fix formula in RelGraphConv (#3285)
* [Doc] fix formula in RelGraphConv * refine descriptions
parent
4ef1c86b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
python/dgl/nn/pytorch/conv/relgraphconv.py
python/dgl/nn/pytorch/conv/relgraphconv.py
+8
-7
No files found.
python/dgl/nn/pytorch/conv/relgraphconv.py
View file @
9cc85aed
...
...
@@ -15,17 +15,16 @@ class RelGraphConv(nn.Module):
Relational graph convolution is introduced in "`Modeling Relational Data with Graph
Convolutional Networks <https://arxiv.org/abs/1703.06103>`__"
and can be described as below:
and can be described
in DGL
as below:
.. math::
h_i^{(l+1)} = \sigma(\sum_{r\in\mathcal{R}}
\sum_{j\in\mathcal{N}^r(i)}
\frac{1}{c_{i,r}
}W_r^{(l)}h_j^{(l)}+W_0^{(l)}h_i^{(l)})
\sum_{j\in\mathcal{N}^r(i)}
e_{j,i
}W_r^{(l)}h_j^{(l)}+W_0^{(l)}h_i^{(l)})
where :math:`\mathcal{N}^r(i)` is the neighbor set of node :math:`i` w.r.t. relation
:math:`r`. :math:`c_{i,r}` is the normalizer equal
to :math:`|\mathcal{N}^r(i)|`. :math:`\sigma` is an activation function. :math:`W_0`
is the self-loop weight.
:math:`r`. :math:`e_{j,i}` is the normalizer. :math:`\sigma` is an activation
function. :math:`W_0` is the self-loop weight.
The basis regularization decomposes :math:`W_r` by:
...
...
@@ -314,8 +313,10 @@ class RelGraphConv(nn.Module):
* An integer list. The i^th element is the number of edges of the i^th type.
This requires the input graph to store edges sorted by their type IDs.
Preferred format if ``lowmem == True``.
norm : torch.Tensor
Optional edge normalizer tensor. Shape: :math:`(|E|, 1)`.
norm : torch.Tensor, optional
Edge normalizer. Could be either
* An :math:`(|E|, 1)` tensor storing the normalizer on each edge.
Returns
-------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment