Training Spiking Neural Networks for Cognitive Tasks: A Versatile Framework Compatible With Various Temporal Codes | IEEE Journals & Magazine | IEEE Xplore