# C4W1 CNN back propagation

**URL:** <https://community.deeplearning.ai/t/c4w1-cnn-back-propagation/49293>\
**Category:** Convolutional Neural Networks\
**Tags:** coursera-platform\
**Created:** [October 12, 2021, 9:43pm UTC](https://community.deeplearning.ai/t/c4w1-cnn-back-propagation/49293 "2021-10-12T21:43:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yunxiangqin](https://avatars.discourse-cdn.com/v4/letter/y/e99b99/32.png) [@yunxiangqin](https://community.deeplearning.ai/u/yunxiangqin)\
**Post date:** [October 12, 2021, 9:43pm UTC](https://community.deeplearning.ai/t/c4w1-cnn-back-propagation/49293/1 "2021-10-12T21:43:00Z")

</div>

When calculating db by summing up dZ (optional assignment), why don’t we need to divide by number of training examples m?

---

<div class="post-metadata">

**Author:** ![jonaslalin](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/jonaslalin/32/63_2.png) [@jonaslalin](https://community.deeplearning.ai/u/jonaslalin)\
**Post date:** [November 2, 2021, 9:19am UTC](https://community.deeplearning.ai/t/c4w1-cnn-back-propagation/49293/2 "2021-11-02T09:19:56Z")

</div>

Probably because the code computes dJ/db and not dL/db as per lecture videos. I like the former notation better because it is a cleaner solution than to introduce dL/db and dL/dW. We have a recent topic where you can read more:

> [@Typo in back prop formula (week3 and week 4)](https://community.deeplearning.ai/t/typo-in-back-prop-formula-week3-and-week-4/50614/5):
>
> OK, I must be making some kind of blunder here. What I proposed is to define all the partial derivatives with respect to J, instead of what you called L, which is an m-dimensional vector, when we are differentiating with respect to Z's. The point is that \frac{\partial L}{\partial Z} is of dimension m\*\dim Z, which messes things up when we use them for calculations for dW and db's. It will also make things a lot more consistent. In this case, \frac{\partial J}{\partial Z^{[L]}}= \frac{1}{m}(A…
