pytorch_cluster
pytorch_cluster copied to clipboard
return radii for FPS
Hi,
Thank you for the great library.
Is there a plan to return the radius of the sampled points as well as the points in the function torch_cluster.fps?
I mean, I want the function to return (points, radius), where points = (x1, x2, x3, ...) and radius = (r1, r2, r2, ...) and r1 > r2 > r3 > ...
Thank you in advance!
Do you mean the smallest radius to all other nodes?
Hi @rusty1s yes, indeed!
I think we can do this. IMO, this should be quite straightforward to implement, since we just need to write the distances into an additional output vector. I would very much welcome a PR on this if you are willing to contribute :)
Hi @rusty1s !
I have a question! in the file fps.py, you imported torch, and you used the function torch.ops.torch_cluster.fps, but I can't find this function in the pytorch repo, where did it came from?
Those are the CPU/CUDA (csr/cpu/csr/cuda) kernels injected into PyTorch by torch_cluster/__init__.
Hi @rusty1s Concerning the first point chosen (either randomly, or the first point in the data), what should be the radius for the latter? We can either choose to not assign to it a radius, in this case, return N point and (N-1) radius, or assign to it a symbolic radius, like -1, what do you think?
Yes, that's tricky indeed. I prefer to use a vector of N-1, but what is the best may heavily depend on the use-case.
Yes, that's tricky indeed. I prefer to use a vector of
N-1, but what is the best may heavily depend on the use-case.
Hi, thanks for your great work. Can you release a new fps function that accpets variable( fps point number) not ratio?
You can track the progress here: https://github.com/rusty1s/pytorch_cluster/pull/85