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
4f7ad258
Unverified
Commit
4f7ad258
authored
Feb 15, 2022
by
Rhett Ying
Committed by
GitHub
Feb 15, 2022
Browse files
[doc] fix error in example (#3736)
parent
8b8fd2c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
python/dgl/nn/pytorch/conv/egatconv.py
python/dgl/nn/pytorch/conv/egatconv.py
+6
-6
No files found.
python/dgl/nn/pytorch/conv/egatconv.py
View file @
4f7ad258
...
...
@@ -53,19 +53,19 @@ class EGATConv(nn.Module):
>>> num_nodes, num_edges = 8, 30
>>> # generate a graph
>>> graph = dgl.rand_graph(
(
num_nodes,num_edges)
)
>>> 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)
...
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
((8, 3, 12), (
30, 3, 10
)
)
torch.Size([8, 3, 15]) torch.Size([
30, 3, 10
]
)
"""
def
__init__
(
self
,
...
...
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