Exercise:Softmax Regression

From Ufldl

Jump to: navigation, search
(Step 2: Implement softmaxCost)
(Step 1: Load data)
Line 27: Line 27:
=== Step 1: Load data ===
=== Step 1: Load data ===
-
The starter code loads the MNIST images and labels into <tt>inputData</tt> and <tt>labels</tt> respectively. The images are pre-processed to scale the pixel values to the range <math>[0, 1]</math>, and the label 0 is remapped to 10 for convenience of implementation. You will not need to change any code in this step for this exercise, but note that your code should be general enough to operate on data of arbitrary size belonging to any number of classes.
+
The starter code loads the MNIST images and labels into <tt>inputData</tt> and <tt>labels</tt> respectively. The images are pre-processed to scale the pixel values to the range <math>[0, 1]</math>, and the label 0 is remapped to 10 for convenience of implementation, so that the labels take values in <math>\{1, 2, \ldots, 10\}</math>. You will not need to change any code in this step for this exercise, but note that your code should be general enough to operate on data of arbitrary size belonging to any number of classes.
=== Step 2: Implement softmaxCost ===
=== Step 2: Implement softmaxCost ===

Revision as of 07:00, 10 May 2011

Personal tools