Probabilistic spiking neural networks : Supervised, unsupervised and adversarial trainings