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

Final layer choice to use concat instead of pooling #31

Open
mdanb opened this issue Apr 10, 2021 · 1 comment
Open

Final layer choice to use concat instead of pooling #31

mdanb opened this issue Apr 10, 2021 · 1 comment

Comments

@mdanb
Copy link

mdanb commented Apr 10, 2021

I noticed that in your implementation, you choose to concatenate node embeddings in the end before doing classification (in the logistic layer) instead of using pooling. Was wondering if you could elaborate on that choice.
PS I'm talking about the code here (see the comment I added):

def add_logistic_layer(self):
    logistic_layers = []
    if self.attention_head > 0:
        logistic_in_dim = [self.attention_head * self.dims[-1]]
    else:
        logistic_in_dim = [self.adjs[-1].shape[0] * self.dims[-1]] # THIS MEANS YOU'RE CONCATENATING
    for d in logistic_in_dim:
        layer = nn.Linear(d, self.out_dim)
        logistic_layers.append(layer)
    self.my_logistic_layers = nn.ModuleList(logistic_layers)
@mweiss17
Copy link
Collaborator

mweiss17 commented May 6, 2021

Not sure how much additional context I can give here -- perhaps @Dutil can provide a better answer.

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