Training neural networks without backpropagation using particles