Exercise:Vectorization

From Ufldl

Jump to: navigation, search
Line 11: Line 11:
=== Step 1: Vectorize your Sparse Autoencoder Implementation ===
=== Step 1: Vectorize your Sparse Autoencoder Implementation ===
-
Using the suggestions from [[Vectorization]] and [[Neural_Network_Vectorization]], vectorize your implementation of <tt>sparseAutoencoderCost.m</tt>. In our implementation, we were able to remove all for-loops with the use of matrix operations, <tt>repmat</tt> (and/or <tt>bsxfun</tt>). A vectorized version of our code ran in under one minute on a fast computer. (Note that you do not need to vectorize the code in the other files.)
+
Using the suggestions from [[Vectorization]] and [[Neural_Network_Vectorization]], vectorize your implementation of <tt>sparseAutoencoderCost.m</tt>. In our implementation, we were able to remove all for-loops with the use of matrix operations, <tt>repmat</tt> (and/or <tt>bsxfun</tt>). A vectorized version of our code ran in under one minute on a fast computer (for learning 25 features from 1000 8x8 image patches).  
 +
 
 +
(Note that you do not need to vectorize the code in the other files.)
=== Step 2: Learn features for handwritten digits ===
=== Step 2: Learn features for handwritten digits ===

Revision as of 06:47, 28 April 2011

Personal tools