bff0fad6c3
do not calculate sum of error in every round of iteration; instead the error will be summed every 2nd times or more, if the previous sum of error is too far away from threshold.