Spiking neural network trained with unsupervised STDP for feature extraction and supervised STDP for classification.