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
pyg_autoscale
Commits
7e84bf5f
"git@developer.sourcefind.cn:OpenDAS/fastmoe.git" did not exist on "5ead59db0f750ce755b98c517de6bef3898b34d5"
Commit
7e84bf5f
authored
Jun 07, 2021
by
rusty1s
Browse files
update
parent
e583d438
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
README.md
README.md
+4
-4
No files found.
README.md
View file @
7e84bf5f
...
@@ -15,7 +15,7 @@ As a result, our approach is provably able to maintain the expressive power of t
...
@@ -15,7 +15,7 @@ As a result, our approach is provably able to maintain the expressive power of t
It provides an easy-to-use interface to convert common and custom GNNs from PyG into its scalable variant:
It provides an easy-to-use interface to convert common and custom GNNs from PyG into its scalable variant:
```
python
```
python
from
torch_geometric.nn
import
GCN
Conv
from
torch_geometric.nn
import
SAGE
Conv
from
torch_geometric_autoscale
import
ScalableGNN
from
torch_geometric_autoscale
import
ScalableGNN
from
torch_geometric_autoscale
import
metis
,
permute
,
SubgraphLoader
from
torch_geometric_autoscale
import
metis
,
permute
,
SubgraphLoader
...
@@ -26,10 +26,10 @@ class GNN(ScalableGNN):
...
@@ -26,10 +26,10 @@ class GNN(ScalableGNN):
pool_size
=
2
,
buffer_size
=
5000
)
pool_size
=
2
,
buffer_size
=
5000
)
self
.
convs
=
ModuleList
()
self
.
convs
=
ModuleList
()
self
.
convs
.
append
(
GCN
Conv
(
in_channels
,
hidden_channels
))
self
.
convs
.
append
(
SAGE
Conv
(
in_channels
,
hidden_channels
))
for
_
in
range
(
num_layers
-
2
):
for
_
in
range
(
num_layers
-
2
):
self
.
convs
.
append
(
GCN
Conv
(
hidden_channels
,
hidden_channels
))
self
.
convs
.
append
(
SAGE
Conv
(
hidden_channels
,
hidden_channels
))
self
.
convs
.
append
(
GCN
Conv
(
hidden_channels
,
out_channels
))
self
.
convs
.
append
(
SAGE
Conv
(
hidden_channels
,
out_channels
))
def
forward
(
self
,
x
,
adj_t
,
*
args
):
def
forward
(
self
,
x
,
adj_t
,
*
args
):
for
conv
,
history
in
zip
(
self
.
convs
[:
-
1
],
self
.
histories
):
for
conv
,
history
in
zip
(
self
.
convs
[:
-
1
],
self
.
histories
):
...
...
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