December 2017
Intermediate to advanced
536 pages
14h 23m
English
We use the RBM class we have already created in the recipe Restricted Boltzmann Machine, with just one change, we do not need to reconstruct the image after training now. Instead, our stacked RBMs will be only forward passing the data up to the last MLP layer of DBN. This is achieved by removing the reconstruct() function from the class, and replacing it with the rbm_output() function:
def rbm_output(self,X): x = tf.nn.sigmoid(tf.matmul(X, self._W) + self._c) return self.session.run(x, feed_dict={self._X: X})
For the data, we consider the Kaggle Face Emotion Recognition data, available at https://www.kaggle.com/c/challenges-in-representation-learning-facial-expression-recognition-challenge. The data description given there is: ...
Read now
Unlock full access