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

Example for STFTSpectrogram layer #1947

Merged
merged 3 commits into from
Oct 15, 2024
Merged

Conversation

mostafa-mahmoud
Copy link
Contributor

After discussion on the contribution of the STFTSpectrogram layer (PR: 20313), I added a code example of using this layer in various modes.

Copy link
Member

@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! The code generally looks good!

examples/audio/stft.py Outdated Show resolved Hide resolved
examples/audio/stft.py Show resolved Hide resolved
examples/audio/stft.py Outdated Show resolved Hide resolved
examples/audio/stft.py Outdated Show resolved Hide resolved
@mostafa-mahmoud
Copy link
Contributor Author

@fchollet I resolved all the comments.

Copy link
Member

@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.

Very nice! My only comment is very minor, so we can merge now.

from keras import layers
from scipy.signal import resample

np.random.seed(41)
Copy link
Member

Choose a reason for hiding this comment

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

The numpy seeding is already included as part of set_random_seed

@fchollet fchollet merged commit 786e5ba into keras-team:master Oct 15, 2024
2 of 3 checks passed
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.

3 participants