In this recipe, we will learn how to first stack RBMs to make a DBN, and then train it to detect emotions. The interesting part of the recipe is that we employ two different learning paradigms: first, we pretrain RBMs one by one using unsupervised learning, and then, in the end, we have an MLP layer, which is trained using supervised learning.