A spiking discontinuity mechanism for deep learning modified code from:https://github.com/benlansdell/rdd