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

How to change the way the graph is built in the code #3

Open
ghost opened this issue Jul 29, 2020 · 1 comment
Open

How to change the way the graph is built in the code #3

ghost opened this issue Jul 29, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 29, 2020

Thank you for your excellent work. It is mentioned in the paper that Knn is used to build the graph. When I read the code, I don't clearly understand which piece of code is used to build the graph. I don't know how this implementation is implemented.

@gyshgx868
Copy link
Owner

Sorry for my late reply.

The code to construct a kNN graph is in this line:

indices = knn(x, k=k) # (batch_size, num_points, k)

Simply put, it is firstly to calculate the pairwise distance of all nodes, and then for each node, take the first k nearest neighbor nodes as its neighbors.

This code is directly borrowed from: https://github.com/WangYueFt/dgcnn/tree/master/pytorch

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