Solved – Examples of “one to many” for RNN/LSTM

lstmmachine learningneural networksnonlinear regressionrecurrent neural network

Are there any examples dealing with "one to many" kind of LSTM?

Basically I am trying to build a model which takes an input vector $a$ and gives an output of $[b_1; b_2 ;b_3; b_4, \ldots; b_n]$ where $b_i$ is a vector. The vectors $a$ and $b_1, b_2, b_3$ … etc have different sizes.

I can't seem to find any examples in literature to begin understanding how to format the input and output, or even how to work around training and testing part. Can RNN even deal with different input and output size in the first place?

Another doubt I have is that lot of blogs on RNN state that they are difficult to train due to their complexity. Why is it so?

Best Answer

The most popular example is the decoder part of the seq2seq recurrent neural network (RNN). Such networks are one of the most basic examples of networks that can be used for machine translation. They consist of two sub-networks: encoder RNN network that takes as input sentence in one language and encodes using some vector representation for the whole sentence, and decoder network that uses the vector representation of a sentence to produce a sentence in target language.

enter image description here

You can find many examples and tutorials on such networks online, e.g. here (above image was taken from this blog), here, here, or here. Moreover, Keras code example can be found on StackOverflow.

Related Question