Biologically Inspired Dynamic Thresholds for Spiking Neural Networks