Simplify check for convergence in backprop.py