Create model:
model=Sequential()
model.add(Dense(input_dim = 12, units = 10, activation='relu', kernel_initializer='uniform'))
model.add(Dense(units = 8, activation='relu', kernel_initializer='uniform'))
model.add(Dense(units = 1, activation='sigmoid', kernel_initializer='uniform'))
print('Training the model...')
Compile model:
model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
while running the model.fit()
Fit the model:
model.fit(X_train,y_train,batch_size=32, epochs=10, verbose=1)
I am getting the error:
ValueError: Error when checking input: expected dense_36_input to have shape
(None, 12) but got array with shape (140, 2)
(140, 2 )
instead of2
we require12
here. Reshape your data withnumpy.reshape
$\endgroup$