How it works...

The RBMs learn the hidden representations/features of the model using unsupervised learning and then the fully connected layers added along with pre-trained RBMs are finetuned.

The accuracy here varies largely on image representation. In the preceding recipe, we have used no image processing, only grayscale images scaled between 0 to 1. But if we add the image processing as done in the following paper, it increases the accuracy further-http://deeplearning.net/wp-content/uploads/2013/03/dlsvm.pdf. Thus we multiply each image by 100.0/255.0 in the preprocess_data function, and add these few lines of the code to main code:

std_image = np.std(X_train, axis=0)
X_train = np.divide(np.subtract(X_train,mean_image), std_image)
X_val = np.divide(np.subtract(X_val,mean_image), std_image)
X_test = np.divide(np.subtract(X_test,mean_image), std_image)
..................Content has been hidden....................

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