Metadata-Version: 2.4
Name: keras-fft
Version: 1.0.0
Summary: FFT pack for Keras3
Author-email: Mathies Wedler <mathies.wedler@gmail.com>
License-Expression: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/MathiesW/KerasFFT
Project-URL: Source, https://github.com/MathiesW/KerasFFT
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: keras
Provides-Extra: tensorflow
Requires-Dist: tensorflow; extra == "tensorflow"
Provides-Extra: jax
Requires-Dist: jax; extra == "jax"
Requires-Dist: jaxlib; extra == "jax"
Dynamic: license-file

# KerasFFT
A package that aims at simplifying the usage of FFT in Keras3.
Keras3 does not have a complex dtype. This means, that the `ops.fft` call is a bit cumbersome, as it expects a tuple of real- and imaginary part in `float32`.

### Basic FFT
The basic FFT part of this package acts as an inplace option for `ops.fft`, which handles the input automatically.
It accepts
- a tuple of real and imaginary part, `fft((x_real, x_imag))`, or
- a single float KerasTensor, which is then interpreted as the real part, `fft(x)`.

The latter option automatically initializes a zero-Tensor with the same shape and dtype as `x`.

### FFT-based differentiation
Additionally, the module `keras_fft.derivative` contains code for the differentiation in Fourier space,
which is an elegant way to get the `n`th derivative of a signal.

### Note
Keras backends JAX and Tensorflow are currently supported.

## Installation

## Usage
