Closed Deep-learning999 closed 4 years ago
import kapre
melspectrogram_layer = kapre.composed.get_melspectrogram_layer(
input_shape=input_shape,
n_fft=512,
hop_length=128,
sample_rate=SR,
n_mels=128,
)
model.add(melspectrogram_layer)
model = Sequential() model.add(Melspectrogram(sr=SR, n_mels=128, n_dft=512, n_hop=128, input_shape=input_shape, return_decibel_melgram=True, trainable_kernel=False, name='melgram',trainable_fb=False)) for layer in model.layers: