Skip to content

Commit

Permalink
new import for graph data
Browse files Browse the repository at this point in the history
  • Loading branch information
weihua916 committed Mar 23, 2020
1 parent 80be812 commit 78b7aaa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
10 changes: 4 additions & 6 deletions examples/graphproppred/mol/main_pyg.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@

### importing OGB

### for loading dataset
from ogb.graphproppred.dataset_pyg import PygGraphPropPredDataset
### for evaluation
from ogb.graphproppred import Evaluator
### for loading dataset and evaluator
from ogb.graphproppred import PygGraphPropPredDataset, Evaluator

cls_criterion = torch.nn.BCEWithLogitsLoss()
reg_criterion = torch.nn.MSELoss()
Expand Down Expand Up @@ -82,8 +80,8 @@ def main():
help='number of epochs to train (default: 100)')
parser.add_argument('--num_workers', type=int, default=0,
help='number of workers (default: 0)')
parser.add_argument('--dataset', type=str, default="ogbg-mol-tox21",
help='dataset name (default: ogbg-mol-tox21)')
parser.add_argument('--dataset', type=str, default="ogbg-mol-hiv",
help='dataset name (default: ogbg-mol-hiv)')

parser.add_argument('--feature', type=str, default="full",
help='full feature or simple feature')
Expand Down
6 changes: 2 additions & 4 deletions examples/graphproppred/ppi/main_pyg.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@

### importing OGB

### for loading dataset
from ogb.graphproppred.dataset_pyg import PygGraphPropPredDataset
### for evaluation
from ogb.graphproppred import Evaluator
### for loading dataset and evaluator
from ogb.graphproppred import PygGraphPropPredDataset, Evaluator

multicls_criterion = torch.nn.CrossEntropyLoss()

Expand Down

0 comments on commit 78b7aaa

Please sign in to comment.