N-dimensional convolutional operators for various semifields
Project description
Pytorch N-Dimensional Semifield Convolutions
PyTorch provides efficient implementations of linear convolution operators, as well as max-pooling operators. Both of these operators can be considered a kind of semifield convolution, where the semifield defines what 'addition' and 'multiplication' mean.
However, there are other semifields that we may wish to use than the linear. As such, this package aims to simplify the process of implementing new semifield convolutions, as well as providing definitions for standard semifields.
These new semifields can be defined using PyTorch broadcasting operators using BroadcastSemifield, or using SelectSemifield / SubtractSemifield in the cases where no appropriate PyTorch operator exists.
The implementations, while not as optimised as the base PyTorch versions, have decent performance. BroadcastSemifield relies on chaining optimised PyTorch operators but suffers from higher memory usage, while SelectSemifield / SubtractSemifield are custom CUDA operators, optionally JIT compiled into PyTorch extensions using my other library pytorch-numba-extension-jit.
Finally, all three implementations work in arbitrary dimensionality: they support 1D, 2D or any dimensionality of inputs and kernels (though the example kernels provided are only 2D).
This package is listed on PyPi; it can be installed with
pip install pytorch-nd-semiconv
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytorch_nd_semiconv-0.1.2.tar.gz.
File metadata
- Download URL: pytorch_nd_semiconv-0.1.2.tar.gz
- Upload date:
- Size: 111.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.26
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35517ede4e527e7befea0e490cf67ecba238e9f7401cbd5845ea22dac5811f07
|
|
| MD5 |
9fc3efa3d038993174f83dd3bf208d50
|
|
| BLAKE2b-256 |
1e47940013135dc79b828af289f5b2f7a9a100bbc8670243e018f1e703576bab
|
File details
Details for the file pytorch_nd_semiconv-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pytorch_nd_semiconv-0.1.2-py3-none-any.whl
- Upload date:
- Size: 33.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.26
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98d9ec107e0e6402ac1f385d42a4a8efa09deca042dd4c184132e894bf6d181a
|
|
| MD5 |
dad72dbcdb26b1e1f84f3ead5d14a326
|
|
| BLAKE2b-256 |
6ca3b1b13d87e7ecbd8558037d0f740e7fc8a045302466f423326285bcd48ca0
|