Exercise:Learning color features with Sparse Autoencoders
From Ufldl
(→Step 2: Learn features on small patches) |
(→Step 1: Modify your sparse autoencoder to use a linear decoder) |
||
Line 9: | Line 9: | ||
=== Dependencies === | === Dependencies === | ||
- | + | You will need: | |
- | + | ||
- | + | ||
- | + | ||
- | You will | + | |
* <tt>sparseAutoencoderCost.m</tt> (and related functions) from [[Exercise:Sparse Autoencoder]] | * <tt>sparseAutoencoderCost.m</tt> (and related functions) from [[Exercise:Sparse Autoencoder]] | ||
+ | |||
+ | The following additional file is also required for this exercise: | ||
+ | * [http://ufldl.stanford.edu/wiki/resources/stl10_patches_100k.zip Sampled 8x8 patches from the STL-10 dataset (stl10_patches_100k.zip)] | ||
''If you have not completed the exercise listed above, we strongly suggest you complete it first.'' | ''If you have not completed the exercise listed above, we strongly suggest you complete it first.'' | ||
Line 30: | Line 29: | ||
=== Step 1: Modify your sparse autoencoder to use a linear decoder === | === Step 1: Modify your sparse autoencoder to use a linear decoder === | ||
- | Copy <tt> | + | Copy <tt>sparseAutoencoderCost.m</tt> to the directory for this exercise and rename it to <tt>sparseAutoencoderLinearCost.m</tt>. Rename the function <tt>sparseAutoencoderCost</tt> in the file to <tt>sparseAutoencoderLinearCost</tt>, and modify it to use a [[Linear Decoders | linear decoder]]. In particular, you should change the cost and gradients returned to reflect the change from a sigmoid to a linear decoder. After making this change, check your gradients to ensure that they are correct. |
=== Step 2: Learn features on small patches === | === Step 2: Learn features on small patches === |