google-deepmind / jraph

A Graph Neural Network Library in Jax
https://jraph.readthedocs.io/en/latest/
Apache License 2.0
1.37k stars 89 forks source link

pad_with_graph using numpy instead of jax.numpy #46

Open ziyuanzhao2000 opened 1 year ago

ziyuanzhao2000 commented 1 year ago

I just found this issue while using this util function in my project, as shown here:

https://github.com/deepmind/jraph/blob/51f5990104f7374492f8f3ea1cbc47feb411c69c/jraph/_src/utils.py#L614-L619

Is there any particular reason for using numpy instead of jax.numpy?

I will be doing GNN training on GPU, which requires the data to stay on the GPU devices, and I'm not sure if using numpy array is good idea in this case.