diff --git a/torch_geometric/transforms/add_positional_encoding.py b/torch_geometric/transforms/add_positional_encoding.py index db646be5a79d..6739479840a4 100644 --- a/torch_geometric/transforms/add_positional_encoding.py +++ b/torch_geometric/transforms/add_positional_encoding.py @@ -147,8 +147,6 @@ def forward(self, data: Data) -> Data: pe_list = [get_self_loop_attr(*to_edge_index(out), num_nodes=N)] for _ in range(self.walk_length - 1): out = out @ adj - if out.layout == torch.sparse_coo: - out = out._coalesced_(True) pe_list.append(get_self_loop_attr(*to_edge_index(out), N)) pe = torch.stack(pe_list, dim=-1)