Skip to content

Commit

Permalink
Fix some typos in doc (#5451)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanx749 authored Sep 15, 2022
1 parent 66c05ec commit 36244de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion torch_geometric/nn/models/explainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def to_captum(model: torch.nn.Module, mask_type: str = "edge",
.. code-block:: python
from captum.attr import IntegratedGradients
from torch_geometric.nn import GCN, from_captum
from torch_geometric.nn import GCN, to_captum
model = GCN(...)
... # Train the model.
Expand Down
3 changes: 2 additions & 1 deletion torch_geometric/nn/to_hetero_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def to_hetero(module: Module, metadata: Metadata, aggr: str = "sum",
class GNN(torch.nn.Module):
def __init__(self):
super().__init__()
self.conv1 = SAGEConv((-1, -1), 32)
self.conv2 = SAGEConv((32, 32), 32)
Expand All @@ -52,7 +53,7 @@ def forward(self, x, edge_index):
node_types = ['paper', 'author']
edge_types = [
('paper', 'cites', 'paper'),
('paper' 'written_by', 'author'),
('paper', 'written_by', 'author'),
('author', 'writes', 'paper'),
]
metadata = (node_types, edge_types)
Expand Down
3 changes: 2 additions & 1 deletion torch_geometric/nn/to_hetero_with_bases_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def to_hetero_with_bases(module: Module, metadata: Metadata, num_bases: int,
class GNN(torch.nn.Module):
def __init__(self):
super().__init__()
self.conv1 = SAGEConv((16, 16), 32)
self.conv2 = SAGEConv((32, 32), 32)
Expand All @@ -56,7 +57,7 @@ def forward(self, x, edge_index):
node_types = ['paper', 'author']
edge_types = [
('paper', 'cites', 'paper'),
('paper' 'written_by', 'author'),
('paper', 'written_by', 'author'),
('author', 'writes', 'paper'),
]
metadata = (node_types, edge_types)
Expand Down

0 comments on commit 36244de

Please sign in to comment.