Course 2 Week 3 exercise initialize


In previous coursers’ video, Ng said that parameters “b” could be initialized to “zeros” better and actually in the previous exercise, that “b” are exactly initialized to “zeros”. But in this exercise, why did the “right answer” lead me to initialize “b” with random values?

(Solution code removed by staff)

And if i use “tf.zeros” to initialized “b”, they will inform me that “b should be a tf.Variable”.(Which couldn’t pass the test)

Thanks for your support in advance!


Hi, @AdamWang.

The reason why GlorotNormal is the right answer is simply because that is what the grader is expecting :sweat_smile:

Initializing the biases to zero is very common, there is nothing wrong with it. But there are other possibilities that may work better for some problems.

Oh, all right, i got it. :joy:Just like the online judging in algorithm competation, there is only one right answer. (i thought that would be more smart to consider more than one result, so i consider maybe that would be my problem before… ) And “zeros” is just one choice, other random values are also OK

Thanks for your replay!

1 Like

Exactly :joy: You’re very welcome!