Extra weights confusion

Prof Ng gives some examples in the lectures in which he shows a problem in which there are only 2 or 3 features, just for simplicity in writing out the formulas. But everything we are doing here is completely general and can handle any number of input “features”. The number of weights is exactly the same as the number of features. In the actual dataset we use for the exercise, the input images are 64 x 64 x 3 RGB images, so the number of features is 64 * 64 * 3 = 12288.

I don’t understand question 2). The training set is the images. You can choose the size of images that you want to use: image processing libraries all support “downsampling” images to any size, but the point is our models require all inputs to have the same number of features and be of the same type (RGB , CMYK, greyscale …). For Logistic Regression, we initialize the weight and bias values to zero. Next week when we get to real Neural Networks, that will no longer work and we will need random initialization to provide “Symmetry Breaking”. Here’s a thread which discusses that in detail.

Question 3 is answered by the first paragraph above.

1 Like