Skip to content
Discussion options

You must be logged in to vote
N = 3
row = torch.arange(N).view(-1, 1).repeat(1, N).view(-1)
col = torch.arange(N).view(-1, 1).repeat(N, 1).view(-1)
edge_index = torch.stack([row, col], dim=0)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@fedeotto
Comment options

Answer selected by fedeotto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants