Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 3, 2024
1 parent 2ad0b90 commit 84eeb2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 4 additions & 3 deletions examples/explain/attention_exaplainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import torch_geometric
from torch_geometric.datasets import Planetoid
from torch_geometric.explain import Explainer, AttentionExplainer
from torch_geometric.explain import AttentionExplainer, Explainer
from torch_geometric.nn import GATConv

if torch.cuda.is_available():
Expand All @@ -19,14 +19,15 @@
dataset = Planetoid(path, name='Cora')
data = dataset[0].to(device)


# GAT Node Classification =====================================================


class GAT(torch.nn.Module):
def __init__(self):
super().__init__()
self.conv1 = GATConv(dataset.num_features, 8, heads=8, dropout=0.6)
self.conv2 = GATConv(64, dataset.num_classes, heads=1, concat=False, dropout=0.6)
self.conv2 = GATConv(64, dataset.num_classes, heads=1, concat=False,
dropout=0.6)

def forward(self, x, edge_index):
x = F.dropout(x, p=0.6, training=self.training)
Expand Down
1 change: 0 additions & 1 deletion examples/explain/graphmask_explainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
dataset = Planetoid(path, name='Cora')
data = dataset[0].to(device)


# GCN Node Classification =====================================================


Expand Down

0 comments on commit 84eeb2b

Please sign in to comment.