2b968e05a99392d1010cec3fb40c97c592f15065,examples/pna.py,,,#,11

Before Change


                in_channels=dataset.num_node_features,
                out_channels=dataset.num_classes, avg_d=data.num_edges / data.num_nodes,
                edge_features=bool(dataset.num_edge_features)).to(device)
data = data.to(device)
optimizer = torch.optim.Adam(model.parameters(), lr=0.01)


def train():

After Change


dataset = Planetoid(path, dataset, transform=T.NormalizeFeatures())
data = dataset[0].to(device)

D = torch.bincount(data.edge_index[1], minlength=data.num_nodes).float()

model = PNAConv(aggregators=args.aggregators.split(), scalers=args.scalers.split(), towers=args.towers,
                divide_input=args.divide_input,
                pretrans_layers=args.pretrans_layers, posttrans_layers=args.posttrans_layers,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: rusty1s/pytorch_geometric
Commit Name: 2b968e05a99392d1010cec3fb40c97c592f15065
Time: 2020-06-30
Author: luca.cavallery@gmail.com
File Name: examples/pna.py
Class Name:
Method Name:


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 629006855ced7af330f87a52a0227797c6bbec07
Time: 2018-08-21
Author: M.N.Tran@ibm.com
File Name: art/classifiers/pytorch.py
Class Name: PyTorchClassifier
Method Name: fit


Project Name: ray-project/ray
Commit Name: d5604eaba321c11c1b9616c283262c4ddea55049
Time: 2020-12-21
Author: sven@anyscale.io
File Name: rllib/models/torch/modules/relative_multi_head_attention.py
Class Name: RelativeMultiHeadAttention
Method Name: forward