# Building your deep neural network - exercise 2

**URL:** <https://community.deeplearning.ai/t/building-your-deep-neural-network-exercise-2/766172>\
**Category:** Neural Networks and Deep Learning\
**Tags:** week-module-4, coursera-platform\
**Created:** [February 8, 2025, 6:17am UTC](https://community.deeplearning.ai/t/building-your-deep-neural-network-exercise-2/766172 "2025-02-08T06:17:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PreSam](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/presam/32/48429_2.png) [@PreSam](https://community.deeplearning.ai/u/PreSam)\
**Post date:** [February 8, 2025, 6:17am UTC](https://community.deeplearning.ai/t/building-your-deep-neural-network-exercise-2/766172/1 "2025-02-08T06:17:13Z")

</div>

Hi,  
I have a doubt. Why do we use double brackets for the bias term: np.zeros(( )) while we use only one for the weights: np.random.randn ( )?

_{moderator edit - solution code removed}_

Thank you  
Prejith

> **[Coursera | Online Courses & Credentials From Top Educators. Join for Free...](https://www.coursera.org/learn/neural-networks-deep-learning/programming/GY8CB/building-your-deep-neural-network-step-by-step)**
>
> Learn online and earn valuable credentials from top universities like Yale, Michigan, Stanford, and leading companies like Google and IBM. Join Coursera for free and transform your career with degrees, certificates, Specializations, & MOOCs in...

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [February 8, 2025, 7:13am UTC](https://community.deeplearning.ai/t/building-your-deep-neural-network-exercise-2/766172/2 "2025-02-08T07:13:17Z")

</div>

From the definition of the np.zeros() function:

 ![image](https://global.discourse-cdn.com/dlai/original/3X/2/2/2244a3449b86ee2a3c8c8f988640203f7507df16.png)

---

<div class="post-metadata">

**Author:** ![PreSam](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/presam/32/48429_2.png) [@PreSam](https://community.deeplearning.ai/u/PreSam)\
**Post date:** [February 8, 2025, 8:59am UTC](https://community.deeplearning.ai/t/building-your-deep-neural-network-exercise-2/766172/3 "2025-02-08T08:59:40Z")

</div>

Thank you
