Two hop node info #3172
Replies: 4 comments 8 replies
-
You should be able to do this by stacking the transform = T.Compose([T.TwoHop(), T.TwoHop()]) |
Beta Was this translation helpful? Give feedback.
-
When I applied coellased coalesced=False 8 frames AssertionError: This type of error ocurrus . How can I recover from this error? |
Beta Was this translation helpful? Give feedback.
-
I WANT three hop away information from a particular node.
…On Mon, 20 Sep 2021, 2:41 pm Jinu Sunil, ***@***.***> wrote:
Correct me if I am wrong here, but looking at the TwoHop() code it looks
like it computes A^2 (square of adjacency matrix). So wouldn't computing
two hop twice give you the 4 hop neighborhood.
In the below example the node 4 is 4-hops hops away from node 0.
data = Data(edge_index = torch.tensor([[0,1,2,3],[1,2,3,4]]))
from torch_geometric.transforms import TwoHop
th = TwoHop()
print(th(th(data)).edge_index)
tensor([[0, 0, 0, 0, 1, 1, 1, 2, 2, 3],
[1, 2, 3, 4, 2, 3, 4, 3, 4, 4]])
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3172 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQ7MTCROMYXMHPSUTMYASHLUC33FPANCNFSM5EIFCXKA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
-
How to multiply a sparse adjacency matrix with a dense adjacency matrix. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
How to add three-hop away information in a edge_index using the class TwoHop ?
Beta Was this translation helpful? Give feedback.
All reactions