# Week 4\_Assignment -Build\_your\_Deep\_Neural\_Network\_

**URL:** <https://community.deeplearning.ai/t/week-4-assignment-build-your-deep-neural-network/522255>\
**Category:** Neural Networks and Deep Learning\
**Tags:** coursera-platform\
**Created:** [December 19, 2023, 11:33am UTC](https://community.deeplearning.ai/t/week-4-assignment-build-your-deep-neural-network/522255 "2023-12-19T11:33:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sheila\_Murunga](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@Sheila\_Murunga](https://community.deeplearning.ai/u/Sheila_Murunga)\
**Post date:** [December 19, 2023, 11:33am UTC](https://community.deeplearning.ai/t/week-4-assignment-build-your-deep-neural-network/522255/1 "2023-12-19T11:33:31Z")

</div>

Dear all,

I have a problem with exercise 9 of the week 4 assignment where am getting the error related to relu\_backward as attached. How do I solve this:

 ![Screenshot 2023-12-19 at 14.24.17](https://global.discourse-cdn.com/dlai/original/3X/d/c/dc857769f4f696c4ded986c505142b980dd42ec3.png)

---

<div class="post-metadata">

**Author:** ![saifkhanengr](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/saifkhanengr/32/152858_2.png) [@saifkhanengr](https://community.deeplearning.ai/u/saifkhanengr)\
**Post date:** [December 19, 2023, 11:58am UTC](https://community.deeplearning.ai/t/week-4-assignment-build-your-deep-neural-network/522255/2 "2023-12-19T11:58:31Z")

</div>

Your input argument to the `linear_activation_backward` function (inside the `L_model_backward`) is incorrect. It should not be `dAL` in the case of `relu`. Think about it. You have to loop over the hidden layers.

---

<div class="post-metadata">

**Author:** ![Kic](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/kic/32/76339_2.png) [@Kic](https://community.deeplearning.ai/u/Kic)\
**Post date:** [December 19, 2023, 12:11pm UTC](https://community.deeplearning.ai/t/week-4-assignment-build-your-deep-neural-network/522255/3 "2023-12-19T12:11:55Z")

</div>

Hi @Sheila_Murunga ,

Looking at the error track back, it suggests that the call for linear\_activtion\_backward() using **‘relu’** as activation function is incorrect. If you referred back to the diagram that shows the backward pass, it shows the activation function for the last layer is **‘sigmoid’**.
