# Optimization Methods assignment is failing hidden tests without any feedback

**URL:** <https://community.deeplearning.ai/t/optimization-methods-assignment-is-failing-hidden-tests-without-any-feedback/1874>\
**Category:** Improving Deep Neural Networks: Hyperparameter tun\
**Tags:** coursera-platform\
**Created:** [April 26, 2021, 11:03pm UTC](https://community.deeplearning.ai/t/optimization-methods-assignment-is-failing-hidden-tests-without-any-feedback/1874 "2021-04-26T23:03:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cms1032](https://avatars.discourse-cdn.com/v4/letter/c/73ab20/32.png) [@cms1032](https://community.deeplearning.ai/u/cms1032)\
**Post date:** [April 26, 2021, 11:03pm UTC](https://community.deeplearning.ai/t/optimization-methods-assignment-is-failing-hidden-tests-without-any-feedback/1874/1 "2021-04-26T23:03:02Z")

</div>

![hiddenTestFail](https://global.discourse-cdn.com/dlai/original/1X/501c33f5dc80ebfe386f6f8bc0ada01262a4cb46.jpeg)

I received all tests passing as part of development. I am looking as to why is it so or how I can check it and not have the situation repeat.

---

<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:** [April 27, 2021, 10:56am UTC](https://community.deeplearning.ai/t/optimization-methods-assignment-is-failing-hidden-tests-without-any-feedback/1874/2 "2021-04-27T10:56:43Z")

</div>

Hi, @cms1032.

The notebook’s test cases may have missed something the grader is picky about.

Feel free to send me a private message with your code and I will try to help you.

---

<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:** [April 27, 2021, 8:45pm UTC](https://community.deeplearning.ai/t/optimization-methods-assignment-is-failing-hidden-tests-without-any-feedback/1874/4 "2021-04-27T20:45:50Z")

</div>

Sorry, no, that link is to your notebook and no-one but you can follow that link. It is private to your account. I have not figured out a way to attach a file to a Discourse post. In any case, please don’t share something like that in a public forum thread like this one. Discourse supports private user to user conversations. Click on the user’s icon or avatar and the click “Message”.

---

<div class="post-metadata">

**Author:** ![cms1032](https://avatars.discourse-cdn.com/v4/letter/c/73ab20/32.png) [@cms1032](https://community.deeplearning.ai/u/cms1032)\
**Post date:** [April 29, 2021, 10:59pm UTC](https://community.deeplearning.ai/t/optimization-methods-assignment-is-failing-hidden-tests-without-any-feedback/1874/5 "2021-04-29T22:59:41Z")

</div>

Thank you for your suggestion. I removed the page and I am using DM’s now.

---

<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 2, 2021, 4:34pm UTC](https://community.deeplearning.ai/t/optimization-methods-assignment-is-failing-hidden-tests-without-any-feedback/1874/6 "2021-05-02T16:34:40Z")

</div>

The problem was the notebook’s tests failed to catch an error in the dimensions of the last mini-batch returned by `random_mini_batches` (_Exercise 2 - random\_mini\_batches_).

The correct dimensions are:

![dims](https://global.discourse-cdn.com/dlai/original/1X/224925c06d5311fb8124baa32229b9dee21df556.png)

---

<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 2, 2021, 5:20pm UTC](https://community.deeplearning.ai/t/optimization-methods-assignment-is-failing-hidden-tests-without-any-feedback/1874/7 "2021-05-02T17:20:47Z")

</div>

Another possible cause for this problem is leaving out `decayRate` when implementing `schedule_lr_decay`:

![schedule_lr_decay](https://global.discourse-cdn.com/dlai/original/1X/4c9c40139bac85b1ed470c07c5dfafa02ad4703e.png)
