Course 1 > week 2 > More vectorization examples: initialization

Hi there,

In Course 1 week 2, I have a question about the presentation More vectorization examples, at 4’14 (or in this picture)

We initialize J=0, dw1=0, dw2=0, db=0
Then in the for loop, the first thing we do is compute z= Wx+b… Shouldn’t we need to initialize W and b too?

Not sure I am posting this in the right section, thanks for telling me.

Thank you all for your help,

Best,

Thanks @petril48 and welcome to the Discourse community, I hope you enjoy the course! You are right, W and b need to be initialized as well, but for the purposes of the presentation it is already assumed that they are available. You will see this more clearly (actually build the function) in the program assignment of week 2.

1 Like