High Dimensional Convolution Layers.
Project description
convd: D-dimensional Convolution Layers (D>3)
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
FFTConvDrequires equal spatial sizes, for exampleN x NorN x N x N.FFTConvDsupports up to 6 spatial dimensions.- 7D+ is not currently supported because TensorFlow
tf.paddoes not support the required tensor rank. FFTConvDrequireskernel_size <= N.FFTConvDis circular convolution, not zero-padded linear convolution.
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
convd-0.0.1.tar.gz
(11.3 kB
view details)
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
convd-0.0.1-py3-none-any.whl
(15.7 kB
view details)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf931cc7ab65b2c4046603b308cf13fee638b59769efa3cdb5744c468e20aa1a
|
|
| MD5 |
d7c942eed419f0c5e0dcd78d332c17bc
|
|
| BLAKE2b-256 |
70230fccbcef46218e3ee6181a2deb4a9db2402a00d79eb4ae236ff6c8c4048b
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03613ffdc15e321dfd480a29291f536e3e847eed5448e746e96934e330142e66
|
|
| MD5 |
13ac7b3d2716421407d696dcf5ba28f4
|
|
| BLAKE2b-256 |
ff79ce3cf14d68aaf7a2976695708df88c6b25e4d5e800bbc680c2b86d3b8ca6
|