Skip to main content
GitHub Actions Black code style

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

Head to https://github.com/google/jax#installation and follow the procedure described there.

Transform Example:

import pywt
import numpy as np;
import jax.numpy as jnp
import src.jwt 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

jaxwt-0.0.2.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

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

jaxwt-0.0.2-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file jaxwt-0.0.2.tar.gz.

File metadata

  • Download URL: jaxwt-0.0.2.tar.gz
  • Upload date:
  • Size: 14.0 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

Hashes for jaxwt-0.0.2.tar.gz
Algorithm Hash digest
SHA256 fbb9874dcbe1bdfb2deb0f7fb1568421c179965d2457f36992eefb27420f3909
MD5 c533810bf8053cc12ed7730e780abb7d
BLAKE2b-256 fa43ff8dbd70ef90e45968db0eddbc2ede344fe813df4e020a428e42556b3321

See more details on using hashes here.

File details

Details for the file jaxwt-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: jaxwt-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 23.3 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

Hashes for jaxwt-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9a67bb7ba5f43624494cd98eff7d3caf2215e781db9555eb1c365bb068a915ab
MD5 7a4e6c25593ab30eacbdedfbe9e0c4fb
BLAKE2b-256 2ffbd42bef5eb85b07623eece8f2e715b61cf15567221151d9d11efdb7a6715a

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