A Spiking Network for Inference of Relations Trained with Neuromorphic Backpropagation