Pattern Recognition Using Spiking Neural Networks