# Zeros initialization for weights matrices

**URL:** <https://community.deeplearning.ai/t/zeros-initialization-for-weights-matrices/116850>\
**Category:** Improving Deep Neural Networks: Hyperparameter tun\
**Tags:** coursera-platform\
**Created:** [April 6, 2022, 10:12pm UTC](https://community.deeplearning.ai/t/zeros-initialization-for-weights-matrices/116850 "2022-04-06T22:12:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohamed\_abd\_elhamid](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@mohamed\_abd\_elhamid](https://community.deeplearning.ai/u/mohamed_abd_elhamid)\
**Post date:** [April 6, 2022, 10:12pm UTC](https://community.deeplearning.ai/t/zeros-initialization-for-weights-matrices/116850/1 "2022-04-06T22:12:33Z")

</div>

I do not understand why gradient descent does not work when the matrix is initialized with zeros. I understand from the first assignment that the the layers output value (z = 0) which then is passed to the last layer (sigmoid layer) and the activation then is sigmoid(0) which is equal to 0.5.

And I also understand that the loss function will always output the same value regardless of the truth value of the training example.

What I do not understand is that the general form of gradient descent is (W = W - learning\_rate \* dw). And in the case of sigmoid function (dw = 1/m \* np.dot(X, (A-Y).T))

The vector A should be a column vector of the value 0.5 and Y is a column vector of ones and zeros so in general dw should not be all zeros.

What am I missing?

---

<div class="post-metadata">

**Author:** ![paulinpaloalto](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/paulinpaloalto/32/187_2.png) [@paulinpaloalto](https://community.deeplearning.ai/u/paulinpaloalto)\
**Post date:** [April 7, 2022, 12:10am UTC](https://community.deeplearning.ai/t/zeros-initialization-for-weights-matrices/116850/2 "2022-04-07T00:10:01Z")

</div>

[Here is a thread](https://community.deeplearning.ai/t/symmetry-breaking-versus-zero-initialization/16061) which discusses in detail why “symmetry breaking” is required for neural networks, but not for Logistic Regression. Please have a look and then ask any followup questions here (that thread is a reference thread, so it’s “closed”).
