I need to train a network to multiply or add 2 inputs, but it doesn\'t seem to approximate well for all points after 20000 iterations. More specifically, I train it on the whole
It may be too late, but a simple solution is to use a RNN (Recurrent Neural Network).
After converting your numbers to digits, your NN will take a couple of digits from the sequence of digits from left to right.
The RNN has to loop one of its output so that it can automatically understand that there is a digit to carry (if the sum is 2, write a 0 and carry 1).
To train it, you'll need to give it the inputs consisting of two digits (one from the first number, the second from the second number) and the desired output. And the RNN will end up finding how to do the sum.
Notice that this RNN will only need to know the 8 following cases to learn how to sum two numbers: