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

Question about the propagation in matrix form #38

Open
RaptorMai opened this issue Dec 31, 2019 · 2 comments
Open

Question about the propagation in matrix form #38

RaptorMai opened this issue Dec 31, 2019 · 2 comments

Comments

@RaptorMai
Copy link

Hi,

Thank you so much for the amazing work. I have one question about the implementation.
In the paper, the propagation rule in matrix form is
image

but in the code, it seems you add leaky_relu to both parts then add them together. I am kind of confused about why does the implementation match the equation?

            side_embeddings = tf.concat(temp_embed, 0)
            # transformed sum messages of neighbors.
            sum_embeddings = tf.nn.leaky_relu(
                tf.matmul(side_embeddings, self.weights['W_gc_%d' % k]) + self.weights['b_gc_%d' % k])

            # bi messages of neighbors.
            bi_embeddings = tf.multiply(ego_embeddings, side_embeddings)
            # transformed bi messages of neighbors.
            bi_embeddings = tf.nn.leaky_relu(
                tf.matmul(bi_embeddings, self.weights['W_bi_%d' % k]) + self.weights['b_bi_%d' % k])

            # non-linear activation.
            ego_embeddings = sum_embeddings + bi_embeddings

            # message dropout.
            ego_embeddings = tf.nn.dropout(ego_embeddings, 1 - self.mess_dropout[k])

            # normalize the distribution of embeddings.
            norm_embeddings = tf.math.l2_normalize(ego_embeddings, axis=1) 
@ustcxiexk
Copy link

I have the same question

@b3326023
Copy link

b3326023 commented Mar 10, 2020

Same question here, and I have another questions:

bi_embeddings = tf.multiply(ego_embeddings, side_embeddings)
whats dose bi mean? I didn't see it in the paper.

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

3 participants