Neural Network Vectorization

From Ufldl

Jump to: navigation, search
m (Fixed tt markup)
Line 137: Line 137:
</syntaxhighlight>  
</syntaxhighlight>  
-
Notice that the <tt>sparsity_delta</tt> is the same regardless of the example we are processing.
+
Recall that when we vectorizing the gradient computations, <tt>delta2</tt> is replaced with matrices. Furthermore, notice that the <tt>sparsity_delta</tt> is the same regardless of the example we are processing; This suggests that vectorizing the computation can be done by simply adding the same values to each example when constructing the <tt>delta2</tt> matrix. Thus, to vectorize the above computations, we can simply add <tt>sparsity_delta</tt> (e.g., using <tt>repmat</tt>) to <tt>delta2</tt>.
-
 
+
-
Recall that when we vectorizing the gradient computations, <tt>delta2</tt> is replaced with matrices. Thus, to vectorize the above computations, we can simply add <tt>sparsity_delta</tt> (using <tt>repmat</tt>) while computing the <tt>delta2</tt> matrices.
+

Revision as of 05:29, 28 April 2011

Personal tools