Error in Lecture: Feed Forward Network Class

  m = X.shape[1]
      for i in range(self.nh+1):
        self.W[i+1] -= learning_rate * dW[i+1] / m
        self.B[i+1] -= learning_rate * dB[i+1] / m

This is part of the Feedfoward networks course. Sir mentions that you divide by the number of items. Does number of items mean number of features or number of training examples?

Hi @Vedanth_Subramaniam,
This should have been number of training examples, and hence X.shape[0].
It’s an error from our end, apologies for the confusion.

But the accuracy of both training and validation sets reduces significantly when I change it to X.shape[0]

Yes, it’s just a chance, and doesn’t applies to all the cases.

1 Like

Probably, we can see it as a pointer to adjusting the learning_rate appropriately.