keunwoochoi/kapre

Calling Magnitude() and Phase() simultaneously

HsuanYang-Wang opened this issue · 1 comments

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

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.