Exercise:Learning color features with Sparse Autoencoders

From Ufldl

Jump to: navigation, search
(Step 2: Learn features on small patches)
(Learning color features with Sparse Autoencoders)
Line 1: Line 1:
== Learning color features with Sparse Autoencoders ==
== Learning color features with Sparse Autoencoders ==
-
In this exercise, you will implement a [[Linear Decoders | linear decoder]] (with the sparse autoencoder) to learn features on color images from the STL10 dataset. These features will be used in an later [[Exercise:Convolution and Pooling | exercise on convolution and pooling]] for classifying STL10 images.
+
In this exercise, you will implement a [[Linear Decoders | linear decoder]] (a sparse autoencoder whose output layer uses a linear activation function).  You will then apply it to learn features on color images from the STL-10 dataset. These features will be used in an later [[Exercise:Convolution and Pooling | exercise on convolution and pooling]] for classifying STL-10 images.
In the file <tt>[http://ufldl.stanford.edu/wiki/resources/linear_decoder_exercise.zip linear_decoder_exercise.zip]</tt> we have provided some starter code. You should write your code at the places indicated "YOUR CODE HERE" in the files.
In the file <tt>[http://ufldl.stanford.edu/wiki/resources/linear_decoder_exercise.zip linear_decoder_exercise.zip]</tt> we have provided some starter code. You should write your code at the places indicated "YOUR CODE HERE" in the files.
Line 10: Line 10:
The following additional files are required for this exercise:
The following additional files are required for this exercise:
-
* [http://ufldl.stanford.edu/wiki/resources/stl10_patches_100k.zip Sampled 8x8 patches from the STL10 dataset (stl10_patches_100k.zip)]
+
* [http://ufldl.stanford.edu/wiki/resources/stl10_patches_100k.zip Sampled 8x8 patches from the STL-10 dataset (stl10_patches_100k.zip)]
* [http://ufldl.stanford.edu/wiki/resources/linear_decoder_exercise.zip Starter Code (linear_decoder_exercise.zip)]
* [http://ufldl.stanford.edu/wiki/resources/linear_decoder_exercise.zip Starter Code (linear_decoder_exercise.zip)]
Line 20: Line 20:
=== Learning from color image patches ===
=== Learning from color image patches ===
-
In all the exercises so far, you have been working only with grayscale images. In this exercise, you will get the opportunity to work with RGB color images for the first time.  
+
In all the exercises so far, you have been working only with grayscale images. In this exercise, you will get to work with RGB color images for the first time.  
Conveniently, the fact that an image has three color channels (RGB), rather than a single gray channel, presents little difficulty for the sparse autoencoder. You can just combine the intensities from all the color channels for the pixels into one long vector, as if you were working with a grayscale image with 3x the number of pixels as the original image.  
Conveniently, the fact that an image has three color channels (RGB), rather than a single gray channel, presents little difficulty for the sparse autoencoder. You can just combine the intensities from all the color channels for the pixels into one long vector, as if you were working with a grayscale image with 3x the number of pixels as the original image.  

Revision as of 01:47, 27 May 2011

Personal tools