Skip to main content

N-dimensional convolutional operators for various semifields

Project description

Pytorch N-Dimensional Semifield Convolutions

Documentation

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).

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

pytorch_nd_semiconv-0.1.0.tar.gz (108.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytorch_nd_semiconv-0.1.0-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

Details for the file pytorch_nd_semiconv-0.1.0.tar.gz.

File metadata

  • Download URL: pytorch_nd_semiconv-0.1.0.tar.gz
  • Upload date:
  • Size: 108.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.26

File hashes

Hashes for pytorch_nd_semiconv-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c9b4bc4e48adbb34d0495f9475d9f86c2ab35841925c2f9d174ec573f89dc1d5
MD5 bda2572a58a12df15943321ef50b9035
BLAKE2b-256 74e58e79ebbaa5b26f393e20f80fd8d13c4b94ca3bd54c93d0ff7bd34201bfef

See more details on using hashes here.

File details

Details for the file pytorch_nd_semiconv-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pytorch_nd_semiconv-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b4421b3090a4b874f616b3315dd0181a5506454d0dbe922adde3d45c60081e4c
MD5 ab9630cffbab79e913b013cb6400b9e3
BLAKE2b-256 301262c8af2b6141c57e1e9a3d23526fedccd1c3de9cea6074a7748b5f14bc23

See more details on using hashes here.

Supported by

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