C1_W2_Linear_Regression: Exercise 1

Hello all.
I am a new comer here.
For MLS C1_W2_Linear_Regression: Exercise 1, the first programing exercise, I keep getting these error messages. Can anyone help on explaining where i am doing wrong?

NameError Traceback (most recent call last)
27 # Loop over training examples
—> 28 for i in range(m):
29 # Your code here to get the prediction f_wb for the ith example
30 f_wb = w * x[i] + b

NameError: name ‘m’ is not defined

Hello @pftung ,

Welcome to the DeepLearning.AI community.

Here’s a couple of steps you can try:

  • Ensure each cell preceding this has been run
  • Check if m is being assigned to m = x.shape[0] in the current cell

If this doesn’t solve it, could you share your code privately to help debug the issue?

1 Like

The learner is implementing a fix for the issue