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

Some questions about the code and equations in paper #6

Open
zhujiagang opened this issue Oct 24, 2020 · 2 comments
Open

Some questions about the code and equations in paper #6

zhujiagang opened this issue Oct 24, 2020 · 2 comments

Comments

@zhujiagang
Copy link

zhujiagang commented Oct 24, 2020

An excellent work! I've several questions.

  1. Why does the par appear in out_grad, while par_pos in out_data?
    float right = in_data[cur + data_offset] * (out_grad[par + grad_offset] - edge_weight * in_grad[cur + grad_offset]);
  2. delta S(Ei,j)/delta wi,j in eq.9 seems to disappear in the code.
    grad_weight_tensor = (grad_all_channel_tensor - grad_norm_all_channel_tensor).sum(1);
  3. The paper says "uniformly sample a vertex as the root and perform breadth-first sorting (BFS) algorithm to obtain the topological order of tree G“. But it seems that the code always start from the index 0.
    if ((sorted_index[i] > 0) || (i == 0)){
@StevenGrove
Copy link
Collaborator

Thanks for your interest in our work.

  1. Because out_data is ordered as the input feature, but out_grad is ordered in the breadth-first-search (BFS) manner.
  2. The "weight" in "refine.cu" is already calculated by S(Ei, j), whose gradient is obtained by using the native PyTorch code. Please refer to the distance_func
    weight_row = self.distance_func(fm[:, :, :-1, :], fm[:, :, 1:, :])
  3. In the BFS algorithm, different vertexes as the root, the algorithm will output a consistent topology. For convenience, we choose the first vertex as the root.

@zhujiagang
Copy link
Author

Got It! Thank you very much!

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