Exercise:Self-Taught Learning

From Ufldl

Jump to: navigation, search
(Initial commit)
(Step Two: Train the sparse autoencoder: Added instructions on saving weights to disk)
Line 19: Line 19:
Next we will train the input data set on the sparse autoencoder. Copy the <tt>sparseAutoencoderCost.m</tt> function from the previous assignment and run the training step. Use the frameworks from previous assignments to ensure that your code is working and vectorized, as no testing facilities are provided in this assignment. After doing so, running the training step should take about half an hour (on a reasonably fast computer). When it is completed, a visualization of pen strokes should be displayed.
Next we will train the input data set on the sparse autoencoder. Copy the <tt>sparseAutoencoderCost.m</tt> function from the previous assignment and run the training step. Use the frameworks from previous assignments to ensure that your code is working and vectorized, as no testing facilities are provided in this assignment. After doing so, running the training step should take about half an hour (on a reasonably fast computer). When it is completed, a visualization of pen strokes should be displayed.
-
Hint: This step takes a very long time, so you might want to avoid running it the second or third times! To do this, enable saveTheta
+
Hint: This step takes a very long time, so you might want to avoid running it on subsequent trials! To do so, after running this step, run <tt>save('theta.mat', 'theta');</tt> from the command line. Then modify one line near the top of the <tt>trainSelfTaught.m</tt> script to set <tt>loadTheta = true;</tt>. This skips the autoencoder training step and loads the saved weights from disk.
IMAGE HERE
IMAGE HERE

Revision as of 18:28, 7 April 2011

Personal tools