You should not train him in any particular order, each batch should contain positive and negative examples in random order. If your classes are balanced, then each batch will have approximately the same number of positive / negative samples.
The easiest way to do this is to randomly shuffle your data (in the first dimension), and then sequentially produce batches. It is also good practice to rearrange your data after each era, so the neural network does not see any pattern in the order in which the samples are presented.
These methods prevent any bias in training the neural network.
source
share