# Regularization

**URL:** <https://community.deeplearning.ai/t/regularization/386183>\
**Category:** Improving Deep Neural Networks: Hyperparameter tun\
**Tags:** coursera-platform\
**Created:** [July 15, 2023, 5:58pm UTC](https://community.deeplearning.ai/t/regularization/386183 "2023-07-15T17:58:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kamal\_Nayan](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@Kamal\_Nayan](https://community.deeplearning.ai/u/Kamal_Nayan)\
**Post date:** [July 15, 2023, 5:58pm UTC](https://community.deeplearning.ai/t/regularization/386183/1 "2023-07-15T17:58:20Z")

</div>

![image](https://global.discourse-cdn.com/dlai/original/3X/7/e/7ee810ac70ba379f6c692f0a846f3aae55966fc8.jpeg)  
Please explain me why have we divided a3 by keep-prob in this slide .  
If possible please explain this with an example.

---

<div class="post-metadata">

**Author:** ![Kamal\_Nayan](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@Kamal\_Nayan](https://community.deeplearning.ai/u/Kamal_Nayan)\
**Post date:** [July 15, 2023, 6:06pm UTC](https://community.deeplearning.ai/t/regularization/386183/2 "2023-07-15T18:06:04Z")

</div>

Also when we implement inverted dropout as in the slide , If we think individually on 3rd layer for each training example , then the no of units dropped out might be different resulting to a different neural network or each training example .  
I think this might be a problem as we have to come to a neural network eventually .  
Explain me if this is wrong

---

<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:** [July 15, 2023, 7:09pm UTC](https://community.deeplearning.ai/t/regularization/386183/3 "2023-07-15T19:09:40Z")

</div>

> [@Kamal\_Nayan](#):
>
> Please explain me why have we divided a3 by keep-prob in this slide .  
> If possible please explain this with an example.

Prof Ng discusses that point in the lecture. If you missed that, I suggest you rewind and watch it again. You can use the interactive transcript to find the relevant part of the lecture.

[Here’s a previous thread](https://community.deeplearning.ai/t/inverted-dropout/12940/4) about this point as well. You can read from that post forward through the thread. Interestingly in the original paper by Geoff Hinton’s group, they don’t do it that way and it makes things quite a bit more complicated.

[Here’s another thread](https://community.deeplearning.ai/t/doubt-related-to-inverted-dropout-technique/275221/2) about it.

And [here’s one](https://community.deeplearning.ai/t/inverted-dropout/12940/10) where it actually shows the effect on the L2-norm of the activation output.

---

<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:** [July 15, 2023, 7:12pm UTC](https://community.deeplearning.ai/t/regularization/386183/4 "2023-07-15T19:12:28Z")

</div>

> [@Kamal\_Nayan](#):
>
> If we think individually on 3rd layer for each training example , then the no of units dropped out might be different resulting to a different neural network or each training example .

You’re right to observe that not every sample within the given batch (or minibatch) is treated the same in any given iteration. [Here’s a thread](https://community.deeplearning.ai/t/inverted-dropout-killing-nodes-or-stabbing-training-examples/49593/2) which talks about that point and also if you read all the way through shows some experiments which demonstrate that it doesn’t make that much difference if you treat all the samples in the batch the same.
