Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FFT Ops #480

Merged
merged 11 commits into from
Jul 20, 2023
Merged

Add FFT Ops #480

merged 11 commits into from
Jul 20, 2023

Conversation

abheesht17
Copy link
Collaborator

@abheesht17 abheesht17 commented Jul 14, 2023

Resolves #429

The reason for not supporting all args at the moment is that TensorFlow supports none of those args. Moreover, there are some inconsistencies between the NumPy FFT API and JAX FFT API. We need a very minimal version for FNet (and for most usecases, I suppose). This can be extended later to support all args.

Copy link
Member

@mattdangerw mattdangerw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, just a few comments

keras_core/backend/jax/math.py Outdated Show resolved Hide resolved
keras_core/backend/jax/math.py Outdated Show resolved Hide resolved
Copy link
Contributor

@fchollet fchollet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

keras_core/backend/jax/math.py Outdated Show resolved Hide resolved
keras_core/backend/jax/math.py Outdated Show resolved Hide resolved
keras_core/ops/math.py Outdated Show resolved Hide resolved
keras_core/backend/torch/math.py Outdated Show resolved Hide resolved
@abheesht17 abheesht17 requested a review from fchollet July 19, 2023 13:37
@fchollet
Copy link
Contributor

Are you able to add it to the numpy backend as well? We can probably just redirect to jax like we do for most nn ops.

@abheesht17
Copy link
Collaborator Author

Are you able to add it to the numpy backend as well? We can probably just redirect to jax like we do for most nn ops.

Redirected to JAX for NumPy backend!

Copy link
Contributor

@fchollet fchollet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM -- thanks for the great contribution! 👍

@fchollet fchollet merged commit 5efd457 into keras-team:main Jul 20, 2023
adi-kmt pushed a commit to adi-kmt/keras-core that referenced this pull request Jul 21, 2023
* Add FFT Ops

* Fixes

* Fix torch

* Address Matt's comments

* Address Francois' comments

* Shift docstrings to correct fns

* Add NumPy backend FFT ops

* Fix numpy backend

* Minor change

* Redirect NumPy FFT to JAX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add FFT Op
3 participants