Differentiable and GPU enabled fast wavelet transforms in JAX.
Features
1d analysis and synthesis transforms are implemented in src/jaxlets/conv_fwt.py.
2d analysis and synthesis transforms are part of the src/jaxlets/conv_fwt_2d.py module.
Installation
To install jax, head over to https://github.com/google/jax#installation and follow the procedure described there. Afterwards type pip install jaxwt to install the Jax-Wavelet-Toolbox.
Documentation
The documentation is available at: https://jax-wavelet-toolbox.readthedocs.io .
Transform Example:
import pywt
import numpy as np;
import jax.numpy as jnp
import jaxwt as jwt
# generate an input of even length.
data = jnp.array([0., 1, 2, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 1, 0])
wavelet = pywt.Wavelet('haar')
# compare the forward fwt coefficients
print(pywt.wavedec(np.array(data), wavelet, mode='zero', level=2))
print(jwt.wavedec(data, wavelet, mode='zero', level=2))
# invert the fwt.
print(jwt.waverec(jwt.wavedec(data, wavelet, mode='zero', level=2), wavelet))
Testing
Unit tests are handled by tox. Clone the repository and run it with the following:
$ pip install tox
$ git clone https://github.com/v0lta/Jax-Wavelet-Toolbox
$ cd Jax-Wavelet-Toolbox
$ tox
Goals
In the spirit of jax the aim is to be 100% pywt compatible. Whenever possible, interfaces should be the same results identical.
64-Bit floating point numbers
To allow 64-bit precision numbers, a jax config flag must be set as shown below:
from jax.config import config
config.update("jax_enable_x64", True)
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 jaxwt-0.0.4.tar.gz.
File metadata
- Download URL: jaxwt-0.0.4.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dfb1134381325bb6e8b077df0d757f15fc316c62090f1c63c5ce7f21f8e2da8
|
|
| MD5 |
9ada7c4e1f6432840500b24aab4a6c26
|
|
| BLAKE2b-256 |
deb5f4ac9f9e9c2dbf81b001749626ee22a4421051cfc19d1ef7a7931adf2d7e
|
File details
Details for the file jaxwt-0.0.4-py3-none-any.whl.
File metadata
- Download URL: jaxwt-0.0.4-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
220294dcf205a83513022cd471932049c11a97d8fa6d0702746cae3b30a6e847
|
|
| MD5 |
5fb60a697b4c9b2e2bf78362390c5830
|
|
| BLAKE2b-256 |
d7dad7c5e9edf4245a8c8655ed301cfe2658c3849fc7b83cf602af82087c81d6
|