Question: I have data which consist training as train\_x and testing train\_y. but major problem is that while fitting to model it shows error like.

Error when checking input: expected dense\_12\_input to have shape (8,) but got array with shape (13923,)

Training data shape is

```
d=np.array(train_x)
d.shape

```

output is

```
(6995, 13923)

```

Testing Data shape is

```
f = np.array(train_y)
f.shape

```

Output is

```
(6995, 8)

```

so we can convert above this or fit in the model

Fitting the data to the training dataset
========================================

```
 classifier.fit(np.array(train_x),np.array(train_y), batch_size=10, epochs=2)

```

how will be convert as per model.

Answer: 
```
classifier.add(Dense(3923, activation='relu', kernel_initializer='random_normal', input_dim=13923)) 
classifier.add(Dense(923, activation='relu', kernel_initializer='random_normal'))
classifier.add(Dense(23, activation='relu', kernel_initializer='random_normal')) 
classifier.add(Dense(8, activation='sigmoid', kernel_initializer='random_normal'))

```
you should apply your data with shape (n, 8) on your fully connected layer.
but you are trying to apply (6995, 13923).
you have some way to pass this issue.
1-change your fully connected layer input shape (i do not suggest this because your target set or ground truth or train\_y have (n, 8) shape)
2-you should put some more fully connected layer before your last fully connected layer to reduce your data shape like fc1(6995, 13923), fc2(6995, 3923), fc3(6995, 923),(6995, 23), fc4(6995, 8)