Skip to Content
Deep Learning Quick Reference
book

Deep Learning Quick Reference

by Mike Bernico
March 2018
Intermediate to advanced
272 pages
7h 53m
English
Packt Publishing
Content preview from Deep Learning Quick Reference

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Keras Deep Learning Cookbook

Keras Deep Learning Cookbook

Rajdeep Dua, Sujit Pal, Manpreet Singh Ghotra
Deep Learning with Keras

Deep Learning with Keras

Antonio Gulli, Sujit Pal

Publisher Resources

ISBN: 9781788837996Supplemental Content