How to change my input shape so i could train in conv1d?

Viewed 19

I am trying to change this neural network for audio classification to become a Conv1d but i still dont know how to change my input shape inside a K-Fold, My data shape is X = (60, 3180) where 60 is my data sample and 3180 my feature, and Y = (60, 5) where 60 is my data sample and 5 is my label and if you could please build a little conv1d neural network

fold_no = 1
for train, test in kfold.split(X, Y):
model = Sequential([
    Dense(100, input_dim=np.shape(X)[1]),
    Activation('relu'),
    Dense(50),
    Activation('relu'),
    Dense(5),
    Activation('softmax'),
    ]) 
model.compile(optimizer='adam',
              loss='categorical_crossentropy',
              metrics=['accuracy'])
print(model.summary())
model.fit(X[train], Y[train], epochs=50, batch_size=5)
model.evaluate(X[test], Y[test])
0 Answers
Related