Skip to main content

Tensorflow wavelet Layers

Project description

tensorflow-wavelets is an implementation of

  • Discrete Wavelets Transform Layer
  • Duel Tree Complex Wavelets Transform Layer
  • Multi Wavelets Transform Neural Networks Layer

Installation

pip install tensorflow-wavelets

Usage

import tensorflow_wavelets.Layers.DWT as DWT
import tensorflow_wavelets.Layers.DTCWT as DTCWT
import tensorflow_wavelets.Layers.DMWT as DMWT

Example

model = keras.Sequential()
model.add(keras.Input(shape=(28, 28, 1)))

model.add(DWT.DWT(name="haar",concat=0))
# name can be found in pywt.wavelist(family)
# concat=0 means to split to 4 smaller layers
# concat=1 will output 1 big layer - concat from 4 smaller layers
model.add(keras.layers.Flatten())
model.add(keras.layers.Dense(nb_classes, activation="softmax"))
model.summary()
_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
dwt_9_haar (DWT)             (None, 14, 14, 4)         0         
_________________________________________________________________
flatten_9 (Flatten)          (None, 784)               0         
_________________________________________________________________
dense_9 (Dense)              (None, 10)                7850      
=================================================================
Total params: 7,850
Trainable params: 7,850
Non-trainable params: 0
_________________________________________________________________

Free Software, Hell Yeah!

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

tensorflow-wavelets-1.0.20.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

tensorflow_wavelets-1.0.20-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file tensorflow-wavelets-1.0.20.tar.gz.

File metadata

  • Download URL: tensorflow-wavelets-1.0.20.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.8

File hashes

Hashes for tensorflow-wavelets-1.0.20.tar.gz
Algorithm Hash digest
SHA256 fedee270d914eb204184bee1516a6bdeaa5ca9d66520dbc62a69b5a42f7ef051
MD5 6b3ff6bf0aaff988de9948ad6a39df30
BLAKE2b-256 e878f76b921e75392c210f87d2fc293545fc9f5b6197f1aea8c50cd3f8f0a4ce

See more details on using hashes here.

File details

Details for the file tensorflow_wavelets-1.0.20-py3-none-any.whl.

File metadata

  • Download URL: tensorflow_wavelets-1.0.20-py3-none-any.whl
  • Upload date:
  • Size: 22.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.8

File hashes

Hashes for tensorflow_wavelets-1.0.20-py3-none-any.whl
Algorithm Hash digest
SHA256 0c96e09b5ea09ec6b9513772e619c8a33f1830449ef836ca3754d69b6ef4aeb1
MD5 2c9bc7e67ef8a299f865d091f18d6a18
BLAKE2b-256 2da540a708f4a6979876b57da98003eec58bdb32930584998740381d34fa60a6

See more details on using hashes here.

Supported by

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