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

Ask for clarification on comments in the aggregate function #12

Open
giuseppefutia opened this issue Jun 8, 2024 · 1 comment
Open

Comments

@giuseppefutia
Copy link

First of all, thank you for this wonderful resource. Could you please clarify the following part of the comment in the aggregate function?

inputs: (e, d) - messages `m_ij` from destination to source nodes

If I understood the logic, I would expect that the defined messages would go from sources (j nodes) to destination (i nodes). Could you elaborate more this point?

Here is the code of the aggregate function:

def aggregate(self, inputs, index):
        """Step (2) Aggregate

        The `aggregate` function aggregates the messages from neighboring nodes,
        according to the chosen aggregation function ('sum' by default).

        Args:
            inputs: (e, d) - messages `m_ij` from destination to source nodes
            index: (e, 1) - list of source nodes for each edge/message in `input`

        Returns:
            aggr_out: (n, d) - aggregated messages `m_i`
        """
        return scatter(inputs, index, dim=self.node_dim, reduce=self.aggr)

Thank you!

@chaitjo
Copy link
Owner

chaitjo commented Jun 11, 2024

Hi @giuseppefutia I think you are right.

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

2 participants