Pattern Recognition with Spiking Neural Networks and Dynamic Synapses