Housing Prices Code not working

Mistakes in your code.

  1. You do not require to import tf, keras nd numpy again in the grader cell as at the beginning only it is imported, rather for the model write the code with inclusive of keras and models.

  2. Your xs and ys variables are incorrect. There are only 6 bedrooms but your xs mentions 10 variable and then the correlation to ys is again incorrect as ys increases to the xs by 50,000 by pricing. So if your xs is 1, 2, 3, then ys would be 1, 1.5, 2

  3. You also have either completely edited the grader cell as I can see your codes arrangement are incorrect. The formatted grader cell doesn’t look like the one you shared

Kindly get a fresh copy and re do the assignment to prevent failure of grade.

  1. You also have edited the return statement from model to mode.predict.

Kindly note these assignments only require you to write codes between ##START AND END CODE HERE####. EDITING OR WRTING ANY CODES OUTSIDE THIS ### EVEN IN GRADING CELL CAUSE FAILURE OF GRADES.

  1. Yours statement for defining model for input is incorrect. Search for that answer by using search tool, you will find many posts on how to write that code correct. You mentioned only keras. Sequential and keras layers dense that is incorrect.

I am sharing how the grader cell looks so you can compare

REGARDS
DP

1 Like