Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GNN-Tutorial-solution #2

Open
pjuangph opened this issue Jun 24, 2020 · 1 comment
Open

GNN-Tutorial-solution #2

pjuangph opened this issue Jun 24, 2020 · 1 comment

Comments

@pjuangph
Copy link

When I try running the example code with the latest version of pytorch_geometric, I am seeing an error with edge_index and message passing.

Inside GCNConv
` def forward(self, x, edge_index):
# x has shape [N, in_channels]
# edge_index has shape [2, E]

    ########################################################################
    #      START OF YOUR CODE (DO NOT DELETE/MODIFY THIS LINE)             #
    ########################################################################
    # Step 1: Add self-loops to the adjacency matrix.
    
    edge_index = add_self_loops(edge_index, num_nodes=x.size(0))

    # Step 2: Linearly transform node feature matrix.
    x = self.lin(x)

    # Step 3-5: Start propagating messages.

    return self.propagate(edge_index=edge_index, x=x) # Problem occurs here
    ########################################################################
    #                             END OF YOUR CODE                         #
    ########################################################################           `

the base class throws an error: ```
Exception has occurred: TypeError
Required parameter edge_index is empty.


@pjuangph
Copy link
Author

I actually resolved this issue. I'll submit my changes to your ipynb file tomorrow. Thanks for sharing your examples and codes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant