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
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
Built Distribution
File details
Details for the file tensorflow-wavelets-1.0.24.tar.gz
.
File metadata
- Download URL: tensorflow-wavelets-1.0.24.tar.gz
- Upload date:
- Size: 19.0 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | a17fc338479b40e5ebd08b5e60746e15e4356a90f74f660f0157a7f9425bf5a8 |
|
MD5 | 896a3b6b04de2629bde7313a68a82165 |
|
BLAKE2b-256 | f090758ce85dfbb534261576a69e609ff7262bfe86c328f9433794377882ffed |
File details
Details for the file tensorflow_wavelets-1.0.24-py3-none-any.whl
.
File metadata
- Download URL: tensorflow_wavelets-1.0.24-py3-none-any.whl
- Upload date:
- Size: 24.7 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f9c36757648f4fcb1c52fc9e7cfa18412d3fd764f471fe27c29ec2bca7e1735 |
|
MD5 | 0af96bc00496633ab9583958de1cdc1b |
|
BLAKE2b-256 | 4cec087bf3addaac0db1188d569186c5948669aa4520cd406bb6abef9328958c |