Role of Synaptic Stochasticity in Training Low-Precision Neural Networks