Minibatch training of neural network ensembles via trajectory sampling