# Gradient Check Course 2 Wee1 Ex4

**URL:** <https://community.deeplearning.ai/t/gradient-check-course-2-wee1-ex4/9652>\
**Category:** Improving Deep Neural Networks: Hyperparameter tun\
**Tags:** coursera-platform\
**Created:** [May 27, 2021, 12:51pm UTC](https://community.deeplearning.ai/t/gradient-check-course-2-wee1-ex4/9652 "2021-05-27T12:51:34Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![nramon](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/nramon/32/129097_2.png) [@nramon](https://community.deeplearning.ai/u/nramon)\
**Post date:** [May 28, 2021, 12:32pm UTC](https://community.deeplearning.ai/t/gradient-check-course-2-wee1-ex4/9652/2 "2021-05-28T12:32:41Z")

</div>

Hi, @Mario_RSC.

Good question.

The problem is you have to hold the rest of the parameters constant while you approximate the gradient with respect to one of them. You’re not using `theta_plus[i]` only to compute `J_plus[i]`. You’re nudging `theta_plus[i]`, but you’re using all the parameters to approximate the gradient. Does that make sense?

Having said that, there are probably more [optimal](https://community.deeplearning.ai/t/doubt-on-assignment-gradient-check-course-2-week-1/4062/2) implementations 🙂

---

_[View the full topic](https://community.deeplearning.ai/t/gradient-check-course-2-wee1-ex4/9652)._
