rusty1s / pytorch_spline_conv

Implementation of the Spline-Based Convolution Operator of SplineCNN in PyTorch
https://arxiv.org/abs/1711.08920
MIT License
172 stars 36 forks source link

Batch operation support #50

Open wdr123 opened 5 months ago

wdr123 commented 5 months ago

Hi authors, thanks for this amazing work. My question is when I try to put the model's parameter in cuda mode, the spline_conv doesn't work and inform me parameters (weights) must be in cpu mode. Also spline_conv seems doesn't support batch as the input tensor's first dimension like other NN's forwarding function. Is that true? If it is, how can we achieve data parallel on GPU with spline_conv(.)? Thanks.

rusty1s commented 5 months ago

You can find the torch.nn.Module implementation here, which should work fine both for CPU and CUDA usage.

For batching, we follow PyG's mini-batch structure, see here for an explanation.

wdr123 commented 5 months ago

Thanks for your help.

On Tue, May 7, 2024 at 8:52 AM Matthias Fey @.***> wrote:

You can find the torch.nn.Module implementation here https://github.com/pyg-team/pytorch_geometric/blob/master/torch_geometric/nn/conv/spline_conv.py, which should work fine both for CPU and CUDA usage.

For batching, we follow PyG's mini-batch structure, see here https://pytorch-geometric.readthedocs.io/en/latest/advanced/batching.html for an explanation.

— Reply to this email directly, view it on GitHub https://github.com/rusty1s/pytorch_spline_conv/issues/50#issuecomment-2098336957, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHW3K7KRPB7QX5DEPNZAIKTZBDFBRAVCNFSM6AAAAABGZSFG26VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJYGMZTMOJVG4 . You are receiving this because you authored the thread.Message ID: @.***>