# Momentum Gradient Descent question

**URL:** <https://community.deeplearning.ai/t/momentum-gradient-descent-question/245103>\
**Category:** Improving Deep Neural Networks: Hyperparameter tun\
**Tags:** coursera-platform\
**Created:** [December 21, 2022, 12:07am UTC](https://community.deeplearning.ai/t/momentum-gradient-descent-question/245103 "2022-12-21T00:07:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hazingo](https://avatars.discourse-cdn.com/v4/letter/h/77aa72/32.png) [@hazingo](https://community.deeplearning.ai/u/hazingo)\
**Post date:** [December 21, 2022, 12:07am UTC](https://community.deeplearning.ai/t/momentum-gradient-descent-question/245103/1 "2022-12-21T00:07:02Z")

</div>

In the implementation stage of momentum gradient descent

VdW = BVdW + (1 -B) \* dW

is the BVdW on the right side of the equation referring to the previous VdW. Because from the last couple videos we learned about implementing exponentially weighted averages, where the equation for V refers to the previous v, is this the same here?

In my head, I was wondering what is the point of BVdW because B is a constant and it does not seem to rely on previous values and you might as well as change the learning rate.

Thank you so much,

---

<div class="post-metadata">

**Author:** ![rmwkwok](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/rmwkwok/32/126977_2.png) [@rmwkwok](https://community.deeplearning.ai/u/rmwkwok)\
**Post date:** [December 21, 2022, 1:21am UTC](https://community.deeplearning.ai/t/momentum-gradient-descent-question/245103/2 "2022-12-21T01:21:32Z")

</div>

Hello @hazingo,

if I just look at your equation, anything that looks like this x = b \* x + (1-b) \* y is a process of doing an exponential moving average (EMA) that updates x with y. The EMA is like a weighted sum, so if b = 0.85, then 85% of the next x comes from the current x and the rest 1-b =15\% from the new y value.

As b is higher, such weighted sum makes x to change slower to the new value y, because a higher b preserves more of the current x. Such ability of “preserving” makes it momentum-like.

If you still have questions or you think my answer isn’t what you are looking for, let me know, and also it would be great if you can share the reference to where you saw the equation, which video or which assignment?

Cheers,  
Raymond

---

<div class="post-metadata">

**Author:** ![hazingo](https://avatars.discourse-cdn.com/v4/letter/h/77aa72/32.png) [@hazingo](https://community.deeplearning.ai/u/hazingo)\
**Post date:** [December 22, 2022, 7:04am UTC](https://community.deeplearning.ai/t/momentum-gradient-descent-question/245103/3 "2022-12-22T07:04:52Z")

</div>

I am referring to the “Momentum gradient scene” on week 2; I’m confused about the implementation.

---

<div class="post-metadata">

**Author:** ![rmwkwok](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/rmwkwok/32/126977_2.png) [@rmwkwok](https://community.deeplearning.ai/u/rmwkwok)\
**Post date:** [December 22, 2022, 11:04am UTC](https://community.deeplearning.ai/t/momentum-gradient-descent-question/245103/4 "2022-12-22T11:04:22Z")

</div>

Can you share the video name and the timestamp of the video which will show what you are confused about? I want to look at what you looked at.

---

<div class="post-metadata">

**Author:** ![hazingo](https://avatars.discourse-cdn.com/v4/letter/h/77aa72/32.png) [@hazingo](https://community.deeplearning.ai/u/hazingo)\
**Post date:** [December 22, 2022, 11:26am UTC](https://community.deeplearning.ai/t/momentum-gradient-descent-question/245103/5 "2022-12-22T11:26:21Z")

</div>

Okay, if you are to look at 3 minutes of the video. I am confused why is it that Vdw = Vdw \* B + (1-B) \* Dw and not V(dw-1) if you are accounting the previous couple of videos

Thanks

---

<div class="post-metadata">

**Author:** ![rmwkwok](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/rmwkwok/32/126977_2.png) [@rmwkwok](https://community.deeplearning.ai/u/rmwkwok)\
**Post date:** [December 23, 2022, 1:55am UTC](https://community.deeplearning.ai/t/momentum-gradient-descent-question/245103/6 "2022-12-23T01:55:42Z")

</div>

So I think this is the equation you are talking about:

![Screenshot_20221223_095257](https://global.discourse-cdn.com/dlai/original/3X/6/f/6fde5d0b950f05dbfcae61f6a74417e8b7a32df0.png)

I believe I have explained why the equation looks the way it is in my [first reply](https://community.deeplearning.ai/t/momentum-gradient-descent-question/245103/2).

Can you explain your logic for V\_{dw} = V (dw - 1)? I need to know how you connect what information from what previous videos in what way to see your idea, and perhaps there is something we all agree and maybe there is something we want to further discuss.

This ( $V\_{dw} = V (dw - 1)$ ) is how I write down this equation ( V\_{dw} = V (dw - 1) ) in latex, and perhaps you want to use latex to present your idea?

Please present your idea in full.

Raymond
