### Installing torch-spline-conv Binaries for PyTorch 2.5 (Shell) Source: https://github.com/rusty1s/pytorch_spline_conv/blob/master/README.md This command installs the `torch-spline-conv` library binaries for PyTorch 2.5.0/2.5.1. Users must replace `${CUDA}` with their specific CUDA version (e.g., `cpu`, `cu118`, `cu121`, `cu124`) to match their PyTorch installation. This provides pre-compiled packages for quick setup. ```Shell pip install torch-spline-conv -f https://data.pyg.org/whl/torch-2.5.0+${CUDA}.html ``` -------------------------------- ### Installing torch-spline-conv from Source (Shell) Source: https://github.com/rusty1s/pytorch_spline_conv/blob/master/README.md This command installs the `torch-spline-conv` library by building it from source. This method requires PyTorch 1.4.0+ and correctly configured `$PATH` and `$CPATH` environment variables pointing to CUDA binaries and includes, respectively. ```Shell pip install torch-spline-conv ``` -------------------------------- ### Installing torch-spline-conv Binaries for PyTorch 2.6 (Shell) Source: https://github.com/rusty1s/pytorch_spline_conv/blob/master/README.md This command installs the `torch-spline-conv` library binaries for PyTorch 2.6.0. Users must replace `${CUDA}` with their specific CUDA version (e.g., `cpu`, `cu118`, `cu124`, `cu126`) to match their PyTorch installation. This method is recommended for ease of installation. ```Shell pip install torch-spline-conv -f https://data.pyg.org/whl/torch-2.6.0+${CUDA}.html ``` -------------------------------- ### Example Usage of spline_conv Function in Python Source: https://github.com/rusty1s/pytorch_spline_conv/blob/master/README.md This snippet demonstrates how to initialize input tensors and call the `spline_conv` function from `torch_spline_conv`. It showcases the required parameters such as node features, edge indices, pseudo coordinates, weights, and kernel size, illustrating a typical setup for graph convolution operations in PyTorch. ```Python import torch from torch_spline_conv import spline_conv x = torch.rand((4, 2), dtype=torch.float) # 4 nodes with 2 features each edge_index = torch.tensor([[0, 1, 1, 2, 2, 3], [1, 0, 2, 1, 3, 2]]) # 6 edges pseudo = torch.rand((6, 2), dtype=torch.float) # two-dimensional edge attributes weight = torch.rand((25, 2, 4), dtype=torch.float) # 25 parameters for in_channels x out_channels kernel_size = torch.tensor([5, 5]) # 5 parameters in each edge dimension is_open_spline = torch.tensor([1, 1], dtype=torch.uint8) # only use open B-splines degree = 1 # B-spline degree of 1 norm = True # Normalize output by node degree. root_weight = torch.rand((2, 4), dtype=torch.float) # separately weight root nodes bias = None # do not apply an additional bias out = spline_conv(x, edge_index, pseudo, weight, kernel_size, is_open_spline, degree, norm, root_weight, bias) print(out.size()) ``` -------------------------------- ### Building C++ API for PyTorch Spline Conv (Shell) Source: https://github.com/rusty1s/pytorch_spline_conv/blob/master/README.md This snippet provides a sequence of shell commands to build and install the C++ API for `torch-spline-conv`. It outlines the standard CMake build process, including creating a build directory, configuring the project, compiling, and installing, with an optional flag for CUDA support. ```Shell mkdir build cd build # Add -DWITH_CUDA=on support for the CUDA if needed cmake .. make make install ``` -------------------------------- ### Running Tests for PyTorch Spline Conv Module (Shell) Source: https://github.com/rusty1s/pytorch_spline_conv/blob/master/README.md This snippet shows the command to execute the test suite for the `torch-spline-conv` project. Running `pytest` is a standard way to verify the functionality and correctness of the module after installation or during development. ```Shell pytest ``` -------------------------------- ### Verifying PyTorch Version (Shell) Source: https://github.com/rusty1s/pytorch_spline_conv/blob/master/README.md This shell command executes a Python one-liner to print the installed PyTorch version. It is a prerequisite check to ensure that PyTorch 1.4.0 or newer is installed before attempting to build `torch-spline-conv` from source. ```Shell python -c "import torch; print(torch.__version__)" ``` -------------------------------- ### Verifying CUDA Binaries Path (Shell) Source: https://github.com/rusty1s/pytorch_spline_conv/blob/master/README.md This command displays the current value of the `$PATH` environment variable. It is used to verify that the `cuda/bin` directory is included in the system's executable search path, which is necessary for compiling `torch-spline-conv` from source with CUDA support. ```Shell echo $PATH ``` -------------------------------- ### Verifying CUDA Include Path (Shell) Source: https://github.com/rusty1s/pytorch_spline_conv/blob/master/README.md This command displays the current value of the `$CPATH` environment variable. It is used to verify that the `cuda/include` directory is included in the system's C/C++ header search path, which is essential for compiling `torch-spline-conv` from source with CUDA support. ```Shell echo $CPATH ``` -------------------------------- ### Setting CUDA Architecture List for Source Build (Shell) Source: https://github.com/rusty1s/pytorch_spline_conv/blob/master/README.md This command sets the `TORCH_CUDA_ARCH_LIST` environment variable, specifying the compute capabilities for which PyTorch should compile CUDA kernels. This is crucial when building from source in a Docker container without an NVIDIA driver, preventing compilation failures. ```Shell export TORCH_CUDA_ARCH_LIST = "6.0 6.1 7.2+PTX 7.5+PTX" ``` -------------------------------- ### BibTeX Citation for SplineCNN Paper Source: https://github.com/rusty1s/pytorch_spline_conv/blob/master/README.md This BibTeX entry provides the necessary information to cite the 'SplineCNN: Fast Geometric Deep Learning with Continuous B-Spline Kernels' paper. It includes details such as authors, title, publication venue (CVPR), and year, essential for academic referencing. ```BibTeX @inproceedings{Fey/etal/2018, title={{SplineCNN}: Fast Geometric Deep Learning with Continuous {B}-Spline Kernels}, author={Fey, Matthias and Lenssen, Jan Eric and Weichert, Frank and M{\"u}ller, Heinrich}, booktitle={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)}, year={2018}, } ``` -------------------------------- ### Applying Spline-Based Convolution Operator (Python) Source: https://github.com/rusty1s/pytorch_spline_conv/blob/master/README.md This Python snippet demonstrates how to use the `spline_conv` function from the `torch_spline_conv` library. It applies a spline-based convolution operator to input graph features, requiring parameters such as node features (`x`), graph connectivity (`edge_index`), pseudo-coordinates (`pseudo`), and kernel weights (`weight`). The function supports various configurations including spline degree, normalization, and optional root weights and bias. ```Python from torch_spline_conv import spline_conv out = spline_conv(x, edge_index, pseudo, weight, kernel_size, is_open_spline, degree=1, norm=True, root_weight=None, bias=None) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.