How about adding something like scatter_order
You mean scatter_sort?
Sometimes, we may want to order the neighbours of the node, according to some relationship score. It maybe useful, if we can order the neighbours. Now, we only have the scatter_max.
Ok, I understand. We do not have a dedicated CUDA kernel for this.
In the meantime I suggest you use to_dense_batch, sort the neighbors, and convert it back to a sparse layout.
how can I convert it back? Thanks
row, col = edge_index
x = to_dense_batch(x, row, fill_value=1e8)
x = x.sort(dim=1)[0]
x = x.view(-1, channels)[x != fill_value]
This should work, however, it is not very efficient :(
cool, many thanks. you are awsome
Most helpful comment
This should work, however, it is not very efficient :(