I'm trying to learn a neural network with stop criteria of difference between error on current and previous iteration. But sometimes error starts growing instead of decreasing and only the difference between current and previous errors is not enough to deal with this situation.
Are there known or best techniques to eliminate this problem?
Now I'm doing something like this - I'm checking if error on current iteration is bigger than on previous one, and if yes count this. When it happens N times in a row, I stop learning. But it doesn't seems like 100% best solution