Exercise:Vectorization

From Ufldl

Jump to: navigation, search
(Step 2: Learn features for handwritten digits)
(Vectorization)
Line 1: Line 1:
== Vectorization ==
== Vectorization ==
-
In the previous problem set, we implemented a sparse autoencoder for patches taken from natural images. In this problem set, you will adapt your sparse autoencoder to work on images of handwritten digits.
+
In the previous problem set, we implemented a sparse autoencoder for patches taken from natural images. In this problem set, you will vectorize your code to make it run much faster, and further adapt your sparse autoencoder to work on images of handwritten digits.  Our network for learning from handwritten digits will be much larger than the one we'd trained on the natural images, and so using the original implementation would have been painfully slow.  But with a vectorized implementation of the autoencoder, you will be able to learn interesting features from the handwritten characeters.  
=== Support Code/Data ===
=== Support Code/Data ===
Line 17: Line 17:
=== Step 2: Learn features for handwritten digits ===
=== Step 2: Learn features for handwritten digits ===
-
Now that you have vectorized the code, it is easy to learn larger sets of features on medium sized images. In this part of the exercise, you will use your sparse autoencoder to learn features for handwritten digits from the MNIST dataset.  This is a large enough data set that running your older, unvectorized implementation would have been painfully slow.
+
Now that you have vectorized the code, it is easy to learn larger sets of features on medium sized images. In this part of the exercise, you will use your sparse autoencoder to learn features for handwritten digits from the MNIST dataset.   
The MNIST data is available at [http://yann.lecun.com/exdb/mnist/]. Download the file <tt>train-images-idx3-ubyte.gz</tt> and decompress it. After obtaining the source images, you should use [[Using the MNIST Dataset | helper functions that we provide]] to load the data into Matlab as matrices.  While the helper functions that we provide will load both the input examples <math>x</math> and the class labels <math>y</math>, for this assignment, you will only need the input examples <math>x</math> since the sparse autoencoder is an ''unsupervised'' learning algorithm.  (In a later assignment, we will use the labels <math>y</math> as well.)  
The MNIST data is available at [http://yann.lecun.com/exdb/mnist/]. Download the file <tt>train-images-idx3-ubyte.gz</tt> and decompress it. After obtaining the source images, you should use [[Using the MNIST Dataset | helper functions that we provide]] to load the data into Matlab as matrices.  While the helper functions that we provide will load both the input examples <math>x</math> and the class labels <math>y</math>, for this assignment, you will only need the input examples <math>x</math> since the sparse autoencoder is an ''unsupervised'' learning algorithm.  (In a later assignment, we will use the labels <math>y</math> as well.)  

Revision as of 19:36, 29 April 2011

Personal tools