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

Calling Magnitude() and Phase() simultaneously #134

Open
HsuanYang-Wang opened this issue Nov 20, 2021 · 1 comment
Open

Calling Magnitude() and Phase() simultaneously #134

HsuanYang-Wang opened this issue Nov 20, 2021 · 1 comment

Comments

@HsuanYang-Wang
Copy link

Hi,

I am looking to call Magnitude() and Phase() simultaneously for the same STFT input and concatenate the magnitude and phase before feeding into the convolution layers in my CNN sequential Keras model.

Is this possible?

Best,

Yang

@keunwoochoi
Copy link
Owner

Hi, yes for sure, but naturally with CNN sequential keras model. You'd want to study how to use Keras Functional API to have multiple branches and concatenate them later.

If you still want your final model to be a Keras Sequential model, you can define another layer (that computes Magnitude and Phase, then concatenate them) using Keras Functional AP - then use the layer in your Sequential model.

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

No branches or pull requests

2 participants