# Neural\_machine\_translation\_with\_attention Ex1 Unexpected values in the result

**URL:** <https://community.deeplearning.ai/t/neural-machine-translation-with-attention-ex1-unexpected-values-in-the-result/60140>\
**Category:** Sequence Models\
**Tags:** coursera-platform\
**Created:** [November 5, 2021, 10:48am UTC](https://community.deeplearning.ai/t/neural-machine-translation-with-attention-ex1-unexpected-values-in-the-result/60140 "2021-11-05T10:48:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kadyrbek](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@Kadyrbek](https://community.deeplearning.ai/u/Kadyrbek)\
**Post date:** [November 5, 2021, 10:48am UTC](https://community.deeplearning.ai/t/neural-machine-translation-with-attention-ex1-unexpected-values-in-the-result/60140/1 "2021-11-05T10:48:44Z")

</div>

Hello everyone.  
I have issue with Ex1 in C5W3A1. I have checked everything but I still cannot solve this issue.

## My results: context[0][0][0:5].numpy() [0.55389315 0.4612731 0.51288927 0.58480364 0.5580185]

AssertionError Traceback (most recent call last)  
 in   
19 print(“\033[92mAll tests passed!”)  
20  
—\> 21 one\_step\_attention\_test(one\_step\_attention)

in one\_step\_attention\_test(target)  
16 assert np.all(context.numpy() \< 1), “All output values must be \< 1 in this example”  
17  
—\> 18 assert np.allclose(context[0][0][0:5].numpy(), [0.50877404, 0.57160693, 0.45448175, 0.50074816, 0.53651875]), “Unexpected values in the result”  
19 print(“\033[92mAll tests passed!”)  
20

AssertionError: Unexpected values in the result

---

<div class="post-metadata">

**Author:** ![Kadyrbek](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@Kadyrbek](https://community.deeplearning.ai/u/Kadyrbek)\
**Post date:** [November 5, 2021, 10:51am UTC](https://community.deeplearning.ai/t/neural-machine-translation-with-attention-ex1-unexpected-values-in-the-result/60140/2 "2021-11-05T10:51:03Z")

</div>

I can send my code if it makes easier to figure out my issue

---

<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:** [November 8, 2021, 7:21am UTC](https://community.deeplearning.ai/t/neural-machine-translation-with-attention-ex1-unexpected-values-in-the-result/60140/3 "2021-11-08T07:21:21Z")

</div>

Were you able to resolve this problem?
