Skip to content

Commit

Permalink
fix #3786
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1s committed Jan 5, 2022
1 parent 0ce9bf6 commit 690a01d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torch_geometric/nn/conv/appnp.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ def forward(self, x: Tensor, edge_index: Adj,

return x

def message(self, x_j: Tensor, edge_weight: Tensor) -> Tensor:
return edge_weight.view(-1, 1) * x_j
def message(self, x_j: Tensor, edge_weight: OptTensor) -> Tensor:
return x_j if edge_weight is None else edge_weight.view(-1, 1) * x_j

def message_and_aggregate(self, adj_t: SparseTensor, x: Tensor) -> Tensor:
return matmul(adj_t, x, reduce=self.aggr)
Expand Down

0 comments on commit 690a01d

Please sign in to comment.