Input/output shape dimensions keras

Hi,
I encountered the following error while trying to train an audio model based on spectrogram features:

ValueError: total size of new array must be unchanged, input_shape = [25], output_shape = [1, 13] Application exited with code 1 (Error)

The model architecture:

model = Sequential()
model.add(Reshape((int(input_length / 13), 13), input_shape=(input_length, )))
model.add(Conv1D(8, kernel_size=3, activation=‘relu’, padding=‘same’))
model.add(MaxPooling1D(pool_size=2, strides=2, padding=‘same’))
model.add(Dropout(0.25))
model.add(Conv1D(16, kernel_size=3, activation=‘relu’, padding=‘same’))
model.add(MaxPooling1D(pool_size=2, strides=2, padding=‘same’))
model.add(Dropout(0.25))
model.add(Flatten())
model.add(Dense(classes, activation=‘softmax’, name=‘y_pred’))

Does anyone have an idea how to solve this issue?

Cheers,
Wolf

Hi @Wolf,

Could you share your project ID? The input shape seems quite small for audio spectrogram features.

Aurelien