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

A small discrepancy between MessagePassing::forward return value and its docstring #136

Open
sadra-barikbin opened this issue Jul 1, 2023 · 0 comments

Comments

@sadra-barikbin
Copy link
Contributor

sadra-barikbin commented Jul 1, 2023

Hello,
In MessagePassing::forward, it's stated that the shape of return value is [..., n_target_cells, out_channels] but its return value is actually of shape [..., n_target_cells_with_neighbors, out_channels] which its last but one dimension size is the number of target cells that have any neighbor in source cells. Which one is supposed to be correct? The implementation or the docstring?

To reproduce:

from topomodelx.base.message_passing import MessagePassing
m = MessagePassing()
x_source = torch.rand((3,10))
neighborhood = torch.tensor([[1, 0, 1], [0, 0, 0]]).to_sparse_coo()
m.forward(x_source, neighborhood).shape # result: torch.Size([1, 10])
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