Skip to content

Commit

Permalink
Heterogeneous Graph Support + GraphGym (pyg-team#3068)
Browse files Browse the repository at this point in the history
* added HGT DBLP example

* typo

* Merge PyG master (pyg-team#52)

* Adding the Facebok Page-Page dataset

* type hints

* documentation CI

* py 3.8

* fix links

* fix links

* fail on warning

* fail on warning

* fix doc

Co-authored-by: benedekrozemberczki <[email protected]>

* revert

* Fix Documentation Rendering (pyg-team#51)

* fix doc rendering

* fix linting

* retrigger checks

* remove pytorch 1.7.0 legacy code (pyg-team#50)

* Fix `copy.deepcopy` within lazy `nn.dense.Linear` (pyg-team#44)

* fix deepcopy within lazy Linear

* fix merge

* assert exception

* example to doc

* resolve conflict

* resolve conflict

* Add Figure and Equation to `to_hetero` docstring (pyg-team#60)

* add tex

* add svg + docstring

* typo

* added equation

* Message Passing Hooks (pyg-team#53)

* add hooks

* docstring

* add docstring

* allow modification of inputs/output

* add test for modifying output

* add additional asserts for modifying output test

* Rename `HeteroData.get_edges` and `HeteroData.get_nodes` (pyg-team#58)

* rename to_edges and to_nodes

* typo

* `HeteroConv` (pyg-team#64)

* clean heteroconv

* init

* init

* clean up

Co-authored-by: rusty1s <[email protected]>

* fix documentation

* bipartite function

* fix test CI

* remove pillow version

* clean up for merge

* Merge PyG master (pyg-team#69)

* renaming: PointConv to PointNetConv

* Fix a broken link in datasets/gdelt.py (pyg-team#2800)

* fix test

* re-add batching of strings

* add quick start table

* gnn cheatsheet

* remove pillow version

Co-authored-by: Dongkwan Kim <[email protected]>

* re-merge

* add lazy column to GNN cheatsheet (pyg-team#70)

* `to_hetero_with_bases(model)` (pyg-team#63)

* update

* fix linting

* basisconv

* add ValueError

* to_hetero_with_bases impl done

* add test

* add comments

* add comments

* docstring

* typo

* update figure

* svg

* typo

* add test

* update

* add rgcn equality test

* typos

* update

* typos

* update figures

* generate new svgs

* fix assignment

* rename

* delete sorted edge types

* rename

* add legend

* fix typo

* Test: Check equal outputs of `to_hetero` and `RGCNConv` (pyg-team#59)

* check equal output

* add sparsetensor test

* check equal output

* add sparsetensor test

* rename

* linting

* add missing import

* `HeteroData` support for `T.NormalizeFeatures` (pyg-team#56)

* normalize features

* allow normalization of any feature

* in-place div

* normalize features

* allow normalization of any feature

* in-place div

* fix test

* no need to re-assign

* `HeteroData` support for `T.AddSelfLoops` (pyg-team#54)

* hetero support for AddSelfLoops

* check for edge_index attribute

* f-string

* retrigger checks

* revert bipartite changes

* hetero support for AddSelfLoops

* check for edge_index attribute

* f-string

* retrigger checks

* revert bipartite changes

* merge master

* merge master

* `HeteroData` support for `T.ToSparseTensor` (pyg-team#55)

* hetero support for ToSparseTensor

* add test

* customize the attribute of SparseTensor.value

* rework sort_edge_index

* hetero support for ToSparseTensor

* add test

* customize the attribute of SparseTensor.value

* rework sort_edge_index

* linting

* `HeteroData` support for `T.ToUndirected` (pyg-team#57)

* to_undirected

* revert bipartite changes

* coalesce + undirected enhancement

* merge master

* revert bipartite changes

* coalesce + undirected enhancement

* merge master

* clean up

* new default relation type

* fix tests

* resolve merge conflicts

* resolve merge conflicts 2

* resolve merge conflicts 3

* Merge PyG master (pyg-team#74)

* renaming: PointConv to PointNetConv

* Fix a broken link in datasets/gdelt.py (pyg-team#2800)

* fix test

* re-add batching of strings

* add quick start table

* gnn cheatsheet

* remove pillow version

* clean up doc for to_dense_batch

* clean up

* add legend to cheatsheet

* Improve terminology (pyg-team#2837)

I think the previous version of the document uses the term 'symmetric' incorrectly. A symmetric matrix is a square matrix that is is equal to its transpose (https://en.wikipedia.org/wiki/Symmetric_matrix). However, the text is only talking about the shape of the matrix, not its content. Hence, 'square (matrix)' would be the correct term to use.

* Add batch_size input to to_dense_batch (pyg-team#2838)

* Add batch_size input to to_dense_batch

* to_dense_batch fix typo in batch_size param use

* add typehints

Co-authored-by: rusty1s <[email protected]>

* typo

* Added return_attention_weights to TransformerConv. (pyg-team#2807)

* added return_weights functionality to tranformer

* added return attn weights tests

* flake8

* added typehints

Co-authored-by: rusty1s <[email protected]>

* MD17 (pyg-team#2843)

* Added MD17 dataset

* Updated Documentation

* Added link to sGDML website in doc

* fixed typos in doc and made train variable description clearer

* clean up

* fix linting

* fix doc warning

Co-authored-by: rusty1s <[email protected]>

* update doc

* remove forward doc

* add static graph support info to cheatsheet

* fix num_nodes in case edge_index is empty

* fix math formula

* faster GDC import

* lazy import

* lazy import for datasets

* lazy import for nn

* Sequential jittable + traceable

* typo

* typo

* update doc

Co-authored-by: Dongkwan Kim <[email protected]>
Co-authored-by: Markus <[email protected]>
Co-authored-by: Jimmie <[email protected]>
Co-authored-by: Jinu Sunil <[email protected]>
Co-authored-by: Moritz R Schäfer <[email protected]>

* re-add

* GraphGym cleaned version (pyg-team#82)

* GraphGym cleaned version

* remove deepsnap dependency

* fix lint errors, part 1

* fix all lint errors

* fix all lint errors

* fix all lint errors

* apply yapf

* Update .gitignore

* Integrate GraphGym into PyG (pyg-team#85)

* GraphGym cleaned version

* remove deepsnap dependency

* fix lint errors, part 1

* fix all lint errors

* fix all lint errors

* fix all lint errors

* apply yapf

* Integrate graphgym into pyg, keep user API in project root

* fix merge conflict

* fix lint errors

* Make optional dependencies

* merge LICENSE from GraphGym

* add import

* clean up LICENSE

* fix import

* resolve merge conflicts

* resolve merge conflicts 2

* Merge PyG master (pyg-team#87)

* renaming: PointConv to PointNetConv

* Fix a broken link in datasets/gdelt.py (pyg-team#2800)

* fix test

* re-add batching of strings

* add quick start table

* gnn cheatsheet

* remove pillow version

* clean up doc for to_dense_batch

* clean up

* add legend to cheatsheet

* Improve terminology (pyg-team#2837)

I think the previous version of the document uses the term 'symmetric' incorrectly. A symmetric matrix is a square matrix that is is equal to its transpose (https://en.wikipedia.org/wiki/Symmetric_matrix). However, the text is only talking about the shape of the matrix, not its content. Hence, 'square (matrix)' would be the correct term to use.

* Add batch_size input to to_dense_batch (pyg-team#2838)

* Add batch_size input to to_dense_batch

* to_dense_batch fix typo in batch_size param use

* add typehints

Co-authored-by: rusty1s <[email protected]>

* typo

* Added return_attention_weights to TransformerConv. (pyg-team#2807)

* added return_weights functionality to tranformer

* added return attn weights tests

* flake8

* added typehints

Co-authored-by: rusty1s <[email protected]>

* MD17 (pyg-team#2843)

* Added MD17 dataset

* Updated Documentation

* Added link to sGDML website in doc

* fixed typos in doc and made train variable description clearer

* clean up

* fix linting

* fix doc warning

Co-authored-by: rusty1s <[email protected]>

* update doc

* remove forward doc

* add static graph support info to cheatsheet

* fix num_nodes in case edge_index is empty

* fix math formula

* faster GDC import

* lazy import

* lazy import for datasets

* lazy import for nn

* Sequential jittable + traceable

* typo

* typo

* update doc

* Simple models (pyg-team#2869)

* Inclusion of new backbone models

* Eliminating head from asap.py

* small correction

* Create test_gcn.py

* Update __init__.py

* Update test_gcn.py

* Left only the convolutional simple models

* Tests included

* update

* clean up

* clean up v2

* fix activation

Co-authored-by: rusty1s <[email protected]>

* Example for MemPooling. (pyg-team#2729)

* example for mem pooling

* backprop on kl loss is done at the end of an epoch. Keys in memory layers are trained only on kl loss.

* added learning rate decay. Using PROTIENS_full

* flake8

* reduced lr. increased weight decay

* changed download location

* added comments

* clean up

Co-authored-by: rusty1s <[email protected]>

* typos

* fix removeisolatednodes transform in case 'data.num_nodes' is present

* fix XConv with dilation > 1

* fix XConv with dilation > 1

* rgcn link prediction  (pyg-team#2734)

* implemented LinkPrediction dataset for loading FB15k237

* implemented evaluation for relational link prediction

* implemented R-GCNConf link prediction example

* fixed bug: wrong initial objects in negative_sampling

* changed file downloader urllib.request.urlretrieve  to pytorch.data.download_url; renamed LinkPrediction class to RelationalLinkPredictionDataset

* update dataset

* update example script

* rename

Co-authored-by: Moritz <moritzblum>
Co-authored-by: rusty1s <[email protected]>

* fix gnnexplainer draw kwargs

* remove python-louvain dependency

* allow customization of output in MP jit mode

* fix test for py3.6

* changed normalisation to same norm from instance norm to be robust to small var (pyg-team#2917)

* add CITATION.cff

* format

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* add basetransform ABC (pyg-team#2924)

* clean up BaseTransform

* clean up GATConv and add comments

* add max_num_neighbors as an additional argument

* fix jit GATConv on PyTorch 1.8.0

* fix doc

* fix gnn explainer with existing self-loops

* Rgcn link pred fix (pyg-team#2946)

* added regularization, removed typo in test

* clean up

Co-authored-by: Moritz <moritzblum>
Co-authored-by: rusty1s <[email protected]>

* typo

* Correct gini coefficient mathcal formula (pyg-team#2932)

* typo

* typo

* Update from_networkx (pyg-team#2923)

* Update from_networkx

* Update test

* Update convert.py

* Minor corrections

* Update test_convert.py

* Corrections

* Update test_convert.py

* Case where there are no edges

* Correcting how edge_attr are concatenated

* clean up + new test

* remove unused code

* add union type

Co-authored-by: rusty1s <[email protected]>

* fix deterministic ordering in from_networkx

* recursive-include *.jinja files

Co-authored-by: Dongkwan Kim <[email protected]>
Co-authored-by: Markus <[email protected]>
Co-authored-by: Jimmie <[email protected]>
Co-authored-by: Jinu Sunil <[email protected]>
Co-authored-by: Moritz R Schäfer <[email protected]>
Co-authored-by: PabloAMC <[email protected]>
Co-authored-by: Moritz Blum <[email protected]>
Co-authored-by: fbragman <[email protected]>
Co-authored-by: Christopher Lee <[email protected]>
Co-authored-by: Tim Daubenschütz <[email protected]>

* resolve merge conflicts 3

* resolve merge conflicts 4

* Implementation of the `HGTLoader` + `ogbn-mag` example (pyg-team#73)

* first try

* update

* HGT Loader

* typo

* first try

* update

* HGT Loader

* typo

* bugfixes

* lazy GATConv

* bugfix

* bugfix

* full working pipeline

* update

* rename

* docstring

* typos

* update

* typo

* typo

* typo

* added comments

* add test

* add tests

* fix example

* rename

* linting

* Random split functionalities (pyg-team#72)

* link split

* create split

* example tests

* link split tests

* fix linting

* update docstring

* undirected option, refactor and docs

* add num nodes as argument to neg sampling

* clean up + remove single object

* update example

* typo

* fix compose

Co-authored-by: rusty1s <[email protected]>

* add basetransform

* typo

* typo

* fix test

* Improve `torch_geometric.data` Documentation (pyg-team#98)

* update data doc

* typo

* typo

* note

* typo

* add docstring

* only show inherited members for data and hetero_data

* documentation update for batch and dataset

* update doc

* update

* fix

* record_stream

* update

* typo

* add/fix data functionality

* linting

* typo

* `_parent` memory leak fix (pyg-team#103)

* memory leak fix

* Clean up

* clean up

* bugfix tests

* typos

* fix test

* fix test

* rename reverse

* (Heterogeneous) `NeighborLoader` (pyg-team#92)

* initial commit

* typo

* neighbor loader functionality + tests

* docstring

* fix docstring

* skip tests

* fix share_memory_

* typo

* typo

* update example

* typo

* share_strategy

* fix cuda calls

* better print

* fix size

* fix print

* final commit

* fix

* some todos

* preprocessed features

* fix to_undirected

* more documentation

* update doc

* fix doc

* fix doc

* Add benchmark code and the example with existing graph classification examples (pyg-team#93)

* add benchmarking utilities

* update graph classification benchmark

* improve code style

* add pytorch-memlab for benchmark code

* skip some tests when cuda is not available

* add type hint when appropriate

* add seed_everything to improve code

* code refactoring

* code refactoring

* code refactoring

* code improvement

* remove unnecessary dataloader import

* change benchmark interface with decorator

* documentation improvement

* linting

* linting part 2

* linting part 3

* seed_everything

* create utils file

* update

* use utils functions

* fix test

* update the profiler to the latest torch (1.8.1+)

* refactor profiler and add more documentation

* refactor profiler and add more documentation

* resolve lint errors

* resolve lint errors

* update

* clean up test and profile

* fix linting

* add to doc

* fix doc

* typo

* update benchmark

Co-authored-by: rusty1s <[email protected]>

* Move `HGTLoader` to `torch_geometric.loader` + clean up (pyg-team#104)

* move files

* use utils functions

* fix example

* update

* fix tests

* fix seed

* fix linear test

* rename

* Support GraphGym custom modules outside PyG package (pyg-team#102)

* GraphGym cleaned version

* remove deepsnap dependency

* fix lint errors, part 1

* fix all lint errors

* fix all lint errors

* fix all lint errors

* apply yapf

* Integrate graphgym into pyg, keep user API in project root

* fix merge conflict

* fix lint errors

* Make optional dependencies

* merge LICENSE from GraphGym

* Enable adding GraphGym customized modules outside PyG package

* lint

* Rename `AddTrainValTestMask` to `RandomNodeSplit` (pyg-team#108)

* initial commit

* rename example

* remove AddTrainValTestMask

* fix linting

* create optimizer config and scheduler config separately (pyg-team#113)

* create optimizer config and scheduler config separately

* fix format

* import explicitly

Co-authored-by: Dong Wang <[email protected]>

* Heterogeneous Graph Tutorial (pyg-team#83)

* add HG tutorial roadmap

* started working on hg tutorial

* hg_tutorial, some text and .tex figure

* added svg

* hg tutorial content

* fix CI

* text and structure

* finished first draft

* fixed one code example

* fixing conventions

* fixing links

* update svg

* some smaller improvements of tutorial

* improvements on tutorial

* hg-tutorial: fixed compiling issue, added detailed content

* added absolute links

* fixed warnings

* streamlined dataset section

* update svg

* update tutorial

* update 2

Co-authored-by: Jan Eric Lenssen <[email protected]>

* typo

* Move data loaders to `torch_geometric.loader` (pyg-team#110)

* move graphsaint

* deprecations

* move clusterloader

* deprecations

* type hints

* move shadow

* typo

* typo

* move datalistloader

* dense data loader

* random node sampler

* fix doc

* Lazy GNN operators (pyg-team#89)

* lazy cheb conv

* lazy GraphConv

* lazy GATv2Conv

* lazy TAGConv

* lazy FAConv

* lazy FeaStConv

* lazy NNConv

* typo

* fix tests

* lazy SuperGATConv

* lazy SuperGATConv fix

* lazy SplineConv

* fix lazy check

* lazy GravNetConv

* arma conv lazy

* dense linear in gmmconv

* typo

* add test

* lazy GMMConv

* doc

* rename (pyg-team#116)

* Revisit `MetaPath2Vec` (pyg-team#114)

* revisit metapath2vec

* update

* typo

* update

* fix doc

* update

* check for attributes rather than key

* Clean up `torch_geometric.profile` further (pyg-team#111)

* remove print_layer_stats

* typos

* update

* readme highlights and quick tour (pyg-team#99)

* readme highlights and quick tour

* arch

* arch image

* arch overview

* list categories

* categorization

* category description

* Update README.md

from Matthias

Co-authored-by: Matthias Fey <[email protected]>

* improved highlights

* Update README.md

Co-authored-by: Matthias Fey <[email protected]>

* Update README.md

Co-authored-by: Matthias Fey <[email protected]>

* Update README.md

Co-authored-by: Matthias Fey <[email protected]>

* Update README.md

Co-authored-by: Matthias Fey <[email protected]>

* minor

* update readme

* update

* update

* update

* update

* fix url

* update

* update

* update

* update

* update

* update

* move ops

* toc

* typo

* typo

* add svgs

* update figure

* fix links

* fix size

* fix size

* typo

Co-authored-by: Matthias Fey <[email protected]>

* fix broken links

* fix links

* Heterogeneous Graph Sampler Tutorial (pyg-team#117)

* initial commit

* address comments

* remove todo

* typo

* Conversion between heterogenous and homogeneous graph objects (pyg-team#115)

* temp checkpoint (wip, will remove)

* (wip) typed graph conversion

* (wip) typed graph conversion

* (wip) typed graph conversion

* update

* typo

* delete examples

Co-authored-by: rusty1s <[email protected]>

* fix test

* update doc

* deprecate NeighborSampler (pyg-team#119)

* Move `torch_geometric.data.DataLoader` to `torch_geometric.loader.DataLoader` (pyg-team#120)

* move dataloader

* rename

* typos

* typos

* fix __cat_dim__

* updategp

* Deprecate `train_test_split_edges` + Modifications to `RandomLinkSplit` (pyg-team#121)

* deprecate train_test_split_edges

* to device transform

* fix example

* add split_labels argument

* fix autoencoder example

* typos

* add docstring

* ARGVA

* seal

* adress comments

* Create example to load `*.csv` and transfer to `HeteroData` (pyg-team#76)

* create example to load csv file and transfer to heter-data

* add ipython notebook version load csv with documentation

* address comment

* first version of csv loading doc

* first version of csv loading doc

* suggestion docs/source/notes/loading_csv.rst

Co-authored-by: Matthias Fey <[email protected]>

* suggestion docs/source/notes/loading_csv.rst

Co-authored-by: Matthias Fey <[email protected]>

* suggestion docs/source/notes/loading_csv.rst

Co-authored-by: Matthias Fey <[email protected]>

* suggestion docs/source/notes/loading_csv.rst

Co-authored-by: Matthias Fey <[email protected]>

* suggestions csv tutorial

* example script load csv + extract fix

* fixed edge index stacking dimension in example and jupyter nb

* linting

* linting2

* rename

* update

* update

* update

* typo

* typo

* update

* rename

* update tutorial

* typo

* address comments

Co-authored-by: Dong Wang <[email protected]>
Co-authored-by: Jan Eric Lenssen <[email protected]>
Co-authored-by: Matthias Fey <[email protected]>

* typo

* fix

* typo

* update

* fix

* fix

Co-authored-by: benedekrozemberczki <[email protected]>
Co-authored-by: Rex Ying <[email protected]>
Co-authored-by: Dongkwan Kim <[email protected]>
Co-authored-by: Markus <[email protected]>
Co-authored-by: Jimmie <[email protected]>
Co-authored-by: Jinu Sunil <[email protected]>
Co-authored-by: Moritz R Schäfer <[email protected]>
Co-authored-by: Jiaxuan <[email protected]>
Co-authored-by: PabloAMC <[email protected]>
Co-authored-by: Moritz Blum <[email protected]>
Co-authored-by: fbragman <[email protected]>
Co-authored-by: Christopher Lee <[email protected]>
Co-authored-by: Tim Daubenschütz <[email protected]>
Co-authored-by: Yue Zhao <[email protected]>
Co-authored-by: Dong Wang <[email protected]>
Co-authored-by: Dong Wang <[email protected]>
Co-authored-by: Jan Eric Lenssen <[email protected]>
  • Loading branch information
18 people authored Sep 3, 2021
1 parent 7edb81a commit 6b423ba
Show file tree
Hide file tree
Showing 328 changed files with 17,517 additions and 1,726 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ jobs:
pip install pandas
pip install h5py
pip install numba
pip install tabulate
pip install git+https://github.com/the-virtual-brain/tvb-geodesic.git
pip install pytorch-memlab
- name: Install main package
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ runs/
.eggs/
lightning_logs/
*.egg-info/
.ipynb_checkpoints
.coverage
.coverage.*
coverage.xml
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2020 Matthias Fey <[email protected]>
Copyright (c) 2021 Matthias Fey, Jiaxuan You <[email protected], [email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
221 changes: 171 additions & 50 deletions README.md

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions benchmark/kernel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ Run (or modify) the whole test suite via
```
$ python main.py
```

For more comprehensive time-measurement and memory usage information, you may use

```
$ python main_performance.py
```
79 changes: 79 additions & 0 deletions benchmark/kernel/main_performance.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import argparse
from itertools import product

import torch

from torch_geometric import seed_everything
from torch_geometric.loader import DataLoader
from torch_geometric.profile import profileit, timeit, get_stats_summary

from datasets import get_dataset
from train_eval import train, eval_acc

from gcn import GCN
from graph_sage import GraphSAGE
from gin import GIN

seed_everything(0)

parser = argparse.ArgumentParser()
parser.add_argument('--epochs', type=int, default=100)
parser.add_argument('--batch_size', type=int, default=128)
parser.add_argument('--lr', type=float, default=0.01)
parser.add_argument('--warmup_profile', type=int, default=1,
help='Skip the first few runs')
parser.add_argument('--goal_accuracy', type=int, default=1,
help='The goal test accuracy')
args = parser.parse_args()

layers = [1, 2, 3]
hiddens = [16, 32]

datasets = ['MUTAG', 'PROTEINS', 'IMDB-BINARY', 'REDDIT-BINARY']

nets = [
GCN,
GraphSAGE,
GIN,
]

device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')

# Decorate train and eval functions:
train = profileit(print_layer_stats=False)(train)
eval_acc = timeit()(eval_acc)

for dataset_name, Net in product(datasets, nets):
dataset = get_dataset(dataset_name, sparse=True)
num_train = int(len(dataset) * 0.8)
num_val = int(len(dataset) * 0.1)

train_dataset = dataset[:num_train]
val_dataset = dataset[num_train:num_train + num_val]
test_dataset = dataset[num_train + num_val:]

train_loader = DataLoader(train_dataset, batch_size=args.batch_size,
shuffle=True)
val_loader = DataLoader(val_dataset, batch_size=args.batch_size,
shuffle=False)
test_loader = DataLoader(test_dataset, batch_size=args.batch_size,
shuffle=False)

for num_layers, hidden in product(layers, hiddens):
print('-----\n{} - {} - {} - {}'.format(dataset_name, Net.__name__,
num_layers, hidden))

model = Net(dataset, num_layers, hidden).to(device)
optimizer = torch.optim.Adam(model.parameters(), lr=args.lr)

stats_list = []
for epoch in range(1, args.epochs + 1):
loss, stats = train(model, optimizer, train_loader)
val_acc, val_time = eval_acc(model, val_loader)
test_acc, test_time = eval_acc(model, test_loader)

if epoch >= args.warmup_profile:
stats_list.append(stats)

stats_summary = get_stats_summary(stats_list)
print(stats_summary)
2 changes: 1 addition & 1 deletion benchmark/kernel/train_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from torch import tensor
from torch.optim import Adam
from sklearn.model_selection import StratifiedKFold
from torch_geometric.data import DataLoader, DenseDataLoader as DenseLoader
from torch_geometric.loader import DataLoader, DenseDataLoader as DenseLoader

device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')

Expand Down
2 changes: 1 addition & 1 deletion benchmark/points/train_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch
import torch.nn.functional as F
from torch.optim import Adam
from torch_geometric.data import DataLoader
from torch_geometric.loader import DataLoader

device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')

Expand Down
179 changes: 179 additions & 0 deletions docs/source/_figures/edge_conv.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions docs/source/_figures/edge_conv.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
\documentclass{standalone}

\usepackage{bm}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
\node at (0,0) {$\bm{x}_i^{\prime} = \max_{j \in \mathcal{N}(i)} \textsc{MLP}_{\hspace{-1pt}\theta} \big([ \bm{x}_i, \bm{x}_j - \bm{x}_i ]\big)$};
\end{tikzpicture}

\end{document}
Loading

0 comments on commit 6b423ba

Please sign in to comment.