Value error: Input arrays should have the same number of samples as target arrays. Found 1600 input samples and 6400 target samples
It looks like the number of examples in X_train i.e. train_data doesn't match with the number of examples in y_train i.e. train_labels. Can you double check it? And, in the future, please attach the full error since it helps in debugging the issue.
Looks like you have 1600 examples for training. And your 8 classes are not separated in samples, so you have an array with 8 x 1600 = 6400 values.
That array must be something such as (1600,8). That is: 1600 samples with 8 possible classes.
Now you need to know how your train_labels
array is organized. Maybe a simple reshape((1600,8))
is enough, if the array is properly ordered.
If not, you have to organize it yourself in 1600 samples of eight labels.