Week 3, assignment, Exercise 4, why error?

I guess this is the first course of M4ML. I am moving the category. But you need to read this, so, in future, you post your query in the correct category.

As Paul mentioned, you need to use dot product. And, here we are using a linear activation function so your implementation of Y_hat is correct. Just look out for the Z.

Best,
Saif.

PS: Posting your code is not allowed, so I am deleting it after this reply.