Skip to main content

A collection of utility functions to work with PyTorch sparse tensors

Project description

Sparsity-preserving gradient utility tools for PyTorch

Python tests License Code Style: Black

A collection of utility functions to work with PyTorch sparse tensors. This is work-in-progress, here be dragons.

Currenly available features with backprop include:

Additional backbone solvers implemented in pytorch with no additional dependencies include:

Additional features:

  • Pairwise voxel encoder for encoding local neighbourhood relationships in a 3D spatial volume with multiple channels, into a sparse COO or CSR matrix
  • Pure PyTorch implementations of indexed multiplication operations (segment_mm and gather_mm - as provided by dgl.ops.segment_mm, pyg_lib.ops.segment_matmul, and dgl.ops.gather_mm)

Things that are missing may be listed as issues.

Installation

The provided package can be installed using:

pip install torchsparsegradutils

or

pip install git+https://github.com/cai4cai/torchsparsegradutils

Unit Tests

A number of unittests are provided, which can be run as:

python -m pytest

(Note that this also runs the tests from unittest)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torchsparsegradutils-0.1.3.tar.gz (69.5 kB view details)

Uploaded Source

Built Distribution

torchsparsegradutils-0.1.3-py3-none-any.whl (87.5 kB view details)

Uploaded Python 3

File details

Details for the file torchsparsegradutils-0.1.3.tar.gz.

File metadata

  • Download URL: torchsparsegradutils-0.1.3.tar.gz
  • Upload date:
  • Size: 69.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for torchsparsegradutils-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f7fe609ce231b048a510d6a41fdf5b235e881f712b7359ccc04ab7ad281f1a44
MD5 5c7b6510b5568e01d2167653f53c684c
BLAKE2b-256 858189dd069e74f1ed4125f42606a11268e3d2340c066b93c52f01ff3c18fece

See more details on using hashes here.

File details

Details for the file torchsparsegradutils-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for torchsparsegradutils-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1140412976709fc1980dd832b84d61c6ac05bae160433807e8a6ead9d7ce482a
MD5 f1eafcd2ad8d0df09a0182861a887dce
BLAKE2b-256 7f783961ac1a330abe9beefccd336e7338197f2c47ec20c1d1c8e53bcb0a4f0a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page