# Error in Initializing Adam Optimization Method in Week 2 of Course 2

**URL:** <https://community.deeplearning.ai/t/error-in-initializing-adam-optimization-method-in-week-2-of-course-2/262435>\
**Category:** Improving Deep Neural Networks: Hyperparameter tun\
**Tags:** coursera-platform\
**Created:** [January 25, 2023, 10:10am UTC](https://community.deeplearning.ai/t/error-in-initializing-adam-optimization-method-in-week-2-of-course-2/262435 "2023-01-25T10:10:13Z")\
**Posts on this page:** 1\
**Showing post:** 10

<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:** [January 25, 2023, 3:44pm UTC](https://community.deeplearning.ai/t/error-in-initializing-adam-optimization-method-in-week-2-of-course-2/262435/10 "2023-01-25T15:44:42Z")

</div>

If you’re sure that doing:

Kernel → Restart and Clear Output  
Cell → Run All Above  
Then run your test cell

doesn’t work, then you must have damaged something in either the notebook or the `public_tests.py` file. Did you modify the “Import” block that is the first code cell in the notebook or did you edit `public_tests.py`? You can get clean copies of both the notebook and the tests by using the procedures on [this thread.](https://community.deeplearning.ai/t/how-to-get-a-clean-copy-of-an-assignment-notebook/73) Then “copy/paste” over your solution code to the clean copy and see if that helps. Note that you need to delete the file `public_tests.py` as part of the procedure or it won’t be replaced.

---

_[View the full topic](https://community.deeplearning.ai/t/error-in-initializing-adam-optimization-method-in-week-2-of-course-2/262435)._
