I am trying deep learning (noob) with Keras. I was trying to creat the model after loading my dataset (training & testing). My code:
scaler = StandardScaler().fit(train)
train=scaler.transform(train)
test=scaler.transform(test)
# Creating Deep Model
model = Sequential()
# Add an input layer
model.add(Dense(12, activation='relu', input_shape=(11,)))
# Add one hidden layer
model.add(Dense(8, activation='relu'))
# Add an output layer
model.add(Dense(1, activation='sigmoid'))
#add improvements
model.add(BatchNormalization())
model.add(Dropout(0.5))
#Train the model
model.compile(loss='binary_crossentropy',optimizer='adam',metrics=
['accuracy'])
model.fit(train,train_targets,epochs=20, batch_size=1, verbose=1)
However, I am recieving an erro at the last line:
ValueError: Error when checking input: expected dense_1_input to have shape (11,) but got array with shape (211,)
what does the error mean? and what could be causing it?