# C1W2 Assignment 2 - grading error for exercise 8

**URL:** <https://community.deeplearning.ai/t/c1w2-assignment-2-grading-error-for-exercise-8/895543>\
**Category:** Neural Networks and Deep Learning\
**Tags:** week-module-1, coursera-platform, dl-ai-learning-platform\
**Created:** [October 7, 2026, 1:35am UTC](https://community.deeplearning.ai/t/c1w2-assignment-2-grading-error-for-exercise-8/895543 "2026-10-07T01:35:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajjuvin](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/rajjuvin/32/127636_2.png) [@rajjuvin](https://community.deeplearning.ai/u/rajjuvin)\
**Post date:** [October 7, 2026, 1:35am UTC](https://community.deeplearning.ai/t/c1w2-assignment-2-grading-error-for-exercise-8/895543/1 "2026-10-07T01:35:03Z")

</div>

When submitting the C1W2 Assignment 2, I’m getting a grading error for an exercise that does not exist. Please see screenshots below. It does not currently affect my pass level but just posting here for information. (Not sure if it is anything I did). Exercise 7 is the last found exercise in the notebook and exercise 5 is the last graded exercise. But the error message refers to exercise 8 which does not exist.

 ![image](https://global.discourse-cdn.com/dlai/original/3X/2/f/2f5dcbbbea33094cf8ed98f91fefef56893abdb1.png)

---

<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:** [October 7, 2026, 3:28am UTC](https://community.deeplearning.ai/t/c1w2-assignment-2-grading-error-for-exercise-8/895543/2 "2026-10-07T03:28:02Z")

</div>

The section numbers and the exercise numbers are not the same. Exercise 8 is the `model` function, which is in Section 5 of the notebook, as you can see here:

 ![Screenshot 2026-10-06 at 8.19.48 PM](https://global.discourse-cdn.com/dlai/original/3X/c/8/c8bb6c96246fcdb4f0d52faf69caa1c9b8768876.webp)

Please run all the cells in the notebook and then check to make sure you pass the local tests for the `model` function as the first step to debugging what is wrong with your solutions.

---

<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:** [October 7, 2026, 3:34am UTC](https://community.deeplearning.ai/t/c1w2-assignment-2-grading-error-for-exercise-8/895543/3 "2026-10-07T03:34:32Z")

</div>

Please show us the output of the `model_test` cell in your notebook. Here’s what it looks like in my notebook, but I have added some print statements to show the shapes of various operands:

 ![Screenshot 2026-10-06 at 8.33.44 PM](https://global.discourse-cdn.com/dlai/original/3X/1/6/16d40e419a21bf7abcbc5d91b1b456b2d511d601.webp)

---

<div class="post-metadata">

**Author:** ![rajjuvin](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/rajjuvin/32/127636_2.png) [@rajjuvin](https://community.deeplearning.ai/u/rajjuvin)\
**Post date:** [October 7, 2026, 3:34pm UTC](https://community.deeplearning.ai/t/c1w2-assignment-2-grading-error-for-exercise-8/895543/4 "2026-10-07T15:34:00Z")

</div>

Hi Paul,

Thank you for looking into this. Please see screenshot below. model\_test had passed. Sorry I realized I was referring to the section numbers earlier.

 ![image](https://global.discourse-cdn.com/dlai/original/3X/d/5/d5da7222ff941499554a8993892db4349b42fb47.png)

---

<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:** [October 7, 2026, 3:56pm UTC](https://community.deeplearning.ai/t/c1w2-assignment-2-grading-error-for-exercise-8/895543/5 "2026-10-07T15:56:58Z")

</div>

Interesting! If you pass the test in the notebook, but fail the grader, then the theory would be that your code is not general in some way. Examples could be directly referencing global variables instead of the formal parameters or hard-coding the parameters being passed in the call to `optimize`, instead of just passing through the values that were passed into `model` at the top level. There should be no equal signs in any of the parameters passed to `optimize`.

---

<div class="post-metadata">

**Author:** ![rajjuvin](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/rajjuvin/32/127636_2.png) [@rajjuvin](https://community.deeplearning.ai/u/rajjuvin)\
**Post date:** [October 7, 2026, 5:03pm UTC](https://community.deeplearning.ai/t/c1w2-assignment-2-grading-error-for-exercise-8/895543/6 "2026-10-07T17:03:02Z")

</div>

Hi Paul,

I tried resubmitting it and it worked. Not sure what I did earlier. Thank you.

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [October 7, 2026, 5:22pm UTC](https://community.deeplearning.ai/t/c1w2-assignment-2-grading-error-for-exercise-8/895543/7 "2026-10-07T17:22:58Z")

</div>

Among the common causes of grader issues is this:

You should manually “Save and Checkpoint” your notebook before submitting for grading. The notebook auto-save feature takes some time before it operates.
