I needed to use cross-validation in the Neural network. I used
kf = KFold(n_splits=5, shuffle=True)
for train_index, test_index in kf.split(train): train_X, train_y = train_XX[train_index], train_yy[train_index]
but I couldn't manage to run. One of the errors I see is
ValueError: Cannot have number of splits n_splits=5 greater than the number of samples: n_samples=2.
I would be glad to have your suggestions if you ever tried CV with in Neural network.