Keras Conv1D model Input_shape value error I am not sure why I am receiving this value error. Additionally, I haven't found a tutorial that explicitly talks about the appropriateness of size of filters and kernel. I would appreciate some input and some links. I am predicting the next to the last or last column.

Here is my code:

import pandas as pd
import keras
from keras import Input, layers , Model
from sklearn.model_selection import train_test_split
from keras.layers import Dropout


input_tensor=Input(shape=(6,))
x= layers.Conv1D(filters=128,kernel_size=18, padding='same', activation='relu')(input_tensor)
#x=layers.MaxPooling1D(5)(x)
#x = Dropout(0.5)(x)

x= layers.Conv1D(256,5, activation='relu')(x)
#x = Dropout(0.4)(x)
#x= layers.Dense(4, activation='relu')(x)
#x = Dropout(0.2)(x)
x= layers.Conv1D(256,5, activation='relu')(x)
x=layers.MaxPooling1D(5)(x)

x = Dropout(0.3)(x)
#x= layers.Dense(16,1, activation='relu')(x)

callbacks_list=[
        keras.callbacks.EarlyStopping(monitor='acc',
                                      patience=3,),
                                      keras.callbacks.ModelCheckpoint(
                                              filepath= 'C:/Users/vtodorova/results3/APIFunctional.py',
                                              monitor='accuracy',
                                              save_best_only=True),
                                              keras.callbacks.ReduceLROnPlateau(
                                                      factor=0.1, patience=10,)]


model.compile(optimizer='RMSprop', loss='mse', metrics=['accuracy'])
#callbacks=callbacks_list
model.fit(X1_train, y1_train, epochs=3, batch_size=256, verbose=1)
model.fit(X2_train, y2_train, epochs=3, batch_size=256, verbose=1)

score1=model.evaluate(X1_train, y1_train)
score2=model.evaluate(X2_train, y2_train)

output_tensor=layers.Dense(1)(x)

model=Model(input_tensor, output_tensor)


Here is the head of the data. The names of the columns and the columns got a little misplaced when I copied and pasted, but I hope its ok.

AutoLeadID  leadage  leadstatustypeid  hasCob  hasSRE 
0   695746319        5                 1           0                 0   
1   695746320        5                 1           0                 0   
2   695746321        5                 1           0                 0   
3   695746322        5                 1           0                 0   
4   695746323        5                 1           0                 0   

   hasSRC   hasCRE                                                hasCRPC  
0                0                      0                         0  
1                0                      0                         0  
2                0                      0                         0  
3                0                      0                         0  
4                0                      0                         0
After running your code &amp; the major issue found out is the lack of proper mentioning of input shape. 

In your case insisted of passing shape=(6,) try to pass shape=(6,1) and make sure your data should in the following format.

x = [[695746319], [5], [1], [0], [0], [0], [0]]