Skip to content

Commit

Permalink
Fix get_mesh_laplacian with normalization="sym" (#7544)
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1s authored Jun 8, 2023
1 parent ca5ba4c commit 0520bbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

### Changed

- Fixed `get_mesh_laplacian` for `normalization="sym"` ([#7544](https://github.com/pyg-team/pytorch_geometric/pull/7544))
- Use `dim_size` to initialize output size of the `EquilibriumAggregation` layer ([#7530](https://github.com/pyg-team/pytorch_geometric/pull/7530))
- Added a `max_num_elements` parameter to the forward method of `GraphMultisetTransformer`, `GRUAggregation`, `LSTMAggregation` and `SetTransformerAggregation` ([#7529](https://github.com/pyg-team/pytorch_geometric/pull/7529))
- Fixed empty edge indices handling in `SparseTensor` ([#7519](https://github.com/pyg-team/pytorch_geometric/pull/7519))
Expand Down
2 changes: 1 addition & 1 deletion torch_geometric/utils/get_mesh_laplacian.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def get_areas(left, centre, right):

if normalization == 'sym':
area_deg_inv_sqrt = area_deg.pow_(-0.5)
area_deg_inv_sqrt[area_deg_inv_sqrt == float('inf')] = 0.0,
area_deg_inv_sqrt[area_deg_inv_sqrt == float('inf')] = 0.0
edge_weight = (area_deg_inv_sqrt[edge_index[0]] * edge_weight *
area_deg_inv_sqrt[edge_index[1]])
elif normalization == 'rw':
Expand Down

0 comments on commit 0520bbb

Please sign in to comment.