-
Hi,Thank you for providing a convenient tool for deep graph learning.But I have some questions about the use of this tool.If Looking forward to your answer. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi. If you concern about the duplicated edges in the graph, you can simply run the For example, here is a graph with duplicated edge: # edge between 0 and 1 is duplicated
edge_index = torch.tensor([[0, 1, 1, 2, 0],
[1, 0, 2, 1, 1]], dtype=torch.long)
x= torch.tensor([[-1], [0], [1]], dtype=torch.float)
data = Data(x=x, edge_index=edge_index)
data
# Data(x=[3, 1], edge_index=[2, 5]) You can get a unique edges after run from torch_geometric.transforms import RemoveDuplicatedEdges
transform = RemoveDuplicatedEdges()
out = transform(data)
out
# Data(x=[3, 1], edge_index=[2, 4]) References: |
Beta Was this translation helpful? Give feedback.
-
Yes :) |
Beta Was this translation helpful? Give feedback.
Yes :)