Reducing Flipping Errors in Deep Neural Networks