Teacher forcing

As seen in the illustration above, when predicting an output at some place in the sequence yt(n), we use yt(n-1) as the input to the LSTM. We then use the output from this time step to predict yt(n+1).

The problem with doing this in training is that if yt(n-1) is wrong, yt(n) will be even more wrong. This chain of increasing wrongness can make things very very slow to train.

A somewhat obvious solution to this problem is to replace each sequence prediction at each time step with the actual correct sequence at that time step. So, rather than using the LSTM prediction for yt(n-1), we would use the actual value from the training set.

We can give the model's training process a boost by using this concept, which happens to be called teacher forcing.

Teacher forcing can sometimes make it difficult for our model to robustly generate sequences outside of those seen in training, but in general the technique can be helpful.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.59.198