# C4W2 assignment: problem with submission

**URL:** <https://community.deeplearning.ai/t/c4w2-assignment-problem-with-submission/615472>\
**Category:** NLP with Attention Models\
**Tags:** week-module-2\
**Created:** [April 23, 2024, 9:47pm UTC](https://community.deeplearning.ai/t/c4w2-assignment-problem-with-submission/615472 "2024-04-23T21:47:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lu\_Huang](https://avatars.discourse-cdn.com/v4/letter/l/a4c791/32.png) [@Lu\_Huang](https://community.deeplearning.ai/u/Lu_Huang)\
**Post date:** [April 23, 2024, 9:47pm UTC](https://community.deeplearning.ai/t/c4w2-assignment-problem-with-submission/615472/1 "2024-04-23T21:47:34Z")

</div>

I finished the assignment and passed all the unit tests, but when submitting the assignment, receiving the following error for all the blocks:

There was a problem compiling the code from your notebook. Details:  
Exception encountered when calling layer ‘softmax\_3’ (type Softmax).

{{function\_node \__wrapped\_\_AddV2\_device_/job:localhost/replica:0/task:0/device:CPU:0}} Incompatible shapes: [1,2,2,150] vs. [1,1,1,2] [Op:AddV2] name:

Even for the scaled dot product attention where the solution is exactly the same as the lab solution, the same problem happens. Can someone help me understand why?

---

<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:** [April 23, 2024, 11:22pm UTC](https://community.deeplearning.ai/t/c4w2-assignment-problem-with-submission/615472/2 "2024-04-23T23:22:48Z")

</div>

Passing the tests in the notebook does not prove your code is perfect. The notebook’s test only cover some fundamentals.

The grader uses different tests.

---

<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 24, 2024, 12:05am UTC](https://community.deeplearning.ai/t/c4w2-assignment-problem-with-submission/615472/3 "2024-04-24T00:05:10Z")

</div>

That sounds like the same problem discussed on [this thread from back in January](https://community.deeplearning.ai/t/c4w2-cannot-graded/543079). There is an answer at the end of the thread.

---

<div class="post-metadata">

**Author:** ![Lu\_Huang](https://avatars.discourse-cdn.com/v4/letter/l/a4c791/32.png) [@Lu\_Huang](https://community.deeplearning.ai/u/Lu_Huang)\
**Post date:** [April 24, 2024, 3:59pm UTC](https://community.deeplearning.ai/t/c4w2-assignment-problem-with-submission/615472/4 "2024-04-24T15:59:38Z")

</div>

Thanks, it worked.

---

<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 24, 2024, 4:01pm UTC](https://community.deeplearning.ai/t/c4w2-assignment-problem-with-submission/615472/5 "2024-04-24T16:01:14Z")

</div>

That’s good news! Thanks for confirming. Of course the real thanks goes to Arvydas, who provided the answer on that other thread. 👍
