Skip to main content

High Dimensional Convolution Layers.

Project description

convd: D-dimensional Convolution Layers (D>3)

PyPI Version Python Versions TensorFlow Version Keras Version CUDA Version License

High-dimensional convolution layers for TensorFlow/Keras.

from convd import FFTConvD, SeparableConv4D, SeparableConv6D

Minimal example of 4D convolution

import tensorflow as tf
from convd import FFTConvD

# Shape: [batch, x1, x2, x3, x4, channels]
x = tf.random.normal([1, 8, 8, 8, 8, 1])
y = FFTConvD(filters=4, kernel_size=3)(x)

print(y.shape)  # (1, 8, 8, 8, 8, 4)

Minimal example of 6D convolution

import tensorflow as tf
from convd import FFTConvD

# Shape: [batch, x1, x2, x3, x4, x5, x6, channels]
x = tf.random.normal([1, 4, 4, 4, 4, 4, 4, 1])
y = FFTConvD(filters=4, kernel_size=3)(x)

print(y.shape)  # (1, 4, 4, 4, 4, 4, 4, 4)

Capabilities

  • FFTConvD: circular convolution for square 1D-6D inputs.
  • SeparableConv4D: separable 4D convolution using 2D kernels.
  • SeparableConv6D: separable 6D convolution using 3D kernels.

Limitations

  • FFTConvD requires equal spatial sizes, for example N x N or N x N x N.
  • FFTConvD supports up to 6 spatial dimensions.
  • 7D+ is not currently supported because TensorFlow tf.pad does not support the required tensor rank.
  • FFTConvD requires kernel_size <= N.
  • FFTConvD is circular convolution, not zero-padded linear convolution.

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

convd-0.0.1.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

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

convd-0.0.1-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file convd-0.0.1.tar.gz.

File metadata

  • Download URL: convd-0.0.1.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for convd-0.0.1.tar.gz
Algorithm Hash digest
SHA256 bf931cc7ab65b2c4046603b308cf13fee638b59769efa3cdb5744c468e20aa1a
MD5 d7c942eed419f0c5e0dcd78d332c17bc
BLAKE2b-256 70230fccbcef46218e3ee6181a2deb4a9db2402a00d79eb4ae236ff6c8c4048b

See more details on using hashes here.

File details

Details for the file convd-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: convd-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for convd-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 03613ffdc15e321dfd480a29291f536e3e847eed5448e746e96934e330142e66
MD5 13ac7b3d2716421407d696dcf5ba28f4
BLAKE2b-256 ff79ce3cf14d68aaf7a2976695708df88c6b25e4d5e800bbc680c2b86d3b8ca6

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