In the RNN package in R, there is an example to use RNN to train summation of two numbers.

I tried to look up in Google, but did not find a good resource to explain how can we use RNN to train this kind of task.

Could you give me some references for this task.

The input of the task is:

X1 X2 Y (with Y = X1 + X2)

You give X1, X2 and Y to RNN, and it can learn how to predict Y.


I based this problem on this video by Geoffrey Hinton:

A toy example of training an RNN

Basically, in order to do binary addition in bit-by-by steps, in order to learn how to carry a 1, a feed-forward neural network needs roughly 10 neurons.

A recurrent neural network can do this using only 3 neurons.

That is what this example demonstrates.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.