# C5 W2 A2 Emojify

**URL:** <https://community.deeplearning.ai/t/c5-w2-a2-emojify/24080>\
**Category:** Sequence Models\
**Tags:** coursera-platform\
**Created:** [July 29, 2021, 12:47pm UTC](https://community.deeplearning.ai/t/c5-w2-a2-emojify/24080 "2021-07-29T12:47:36Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iagupov](https://avatars.discourse-cdn.com/v4/letter/i/54ee81/32.png) [@Iagupov](https://community.deeplearning.ai/u/Iagupov)\
**Post date:** [July 29, 2021, 12:47pm UTC](https://community.deeplearning.ai/t/c5-w2-a2-emojify/24080/1 "2021-07-29T12:47:36Z")

</div>

Hello,  
I have passed all the tests and successfully passed the submission 100/100, but in the “2.5 - Train the Model”, instead of accuracy between 90% and 100%, I have an accuracy equal to 69%.  
I have already restart the kernel and rerun the notebook and even try to run locally on my computer. It’s always the same.  
Could you please help?  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![padeossa](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/padeossa/32/289_2.png) [@padeossa](https://community.deeplearning.ai/u/padeossa)\
**Post date:** [July 29, 2021, 8:08pm UTC](https://community.deeplearning.ai/t/c5-w2-a2-emojify/24080/2 "2021-07-29T20:08:06Z")

</div>

I’m exactly in the same weird thing with training in the 99%

 ![image](https://global.discourse-cdn.com/dlai/original/2X/0/05ff54ad576329475086c2059146d1a7140eb9b6.png)

---

<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:** [July 30, 2021, 7:45pm UTC](https://community.deeplearning.ai/t/c5-w2-a2-emojify/24080/3 "2021-07-30T19:45:15Z")

</div>

I got 83%, so the unit test seems to be OK.

---

<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:** [July 30, 2021, 7:47pm UTC](https://community.deeplearning.ai/t/c5-w2-a2-emojify/24080/4 "2021-07-30T19:47:21Z")

</div>

Please download your notebook (as a .py file, the notebook itself is too large), and sent it to me via a private message.

---

<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:** [August 3, 2021, 3:58am UTC](https://community.deeplearning.ai/t/c5-w2-a2-emojify/24080/5 "2021-08-03T03:58:10Z")

</div>

@padeossa, when you use the “.split()” function, are you including a “sep=…” argument?

---

<div class="post-metadata">

**Author:** ![Iagupov](https://avatars.discourse-cdn.com/v4/letter/i/54ee81/32.png) [@Iagupov](https://community.deeplearning.ai/u/Iagupov)\
**Post date:** [August 3, 2021, 6:46am UTC](https://community.deeplearning.ai/t/c5-w2-a2-emojify/24080/6 "2021-08-03T06:46:01Z")

</div>

Thank you, it really works! My accuracy now changed to 83% after I changed .split(sep=’ ') to .split() in sentence\_to\_avg() and sentences\_to\_indices() functions.

---

<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:** [August 3, 2021, 4:45pm UTC](https://community.deeplearning.ai/t/c5-w2-a2-emojify/24080/7 "2021-08-03T16:45:17Z")

</div>

Thanks for your report.

---

<div class="post-metadata">

**Author:** ![beto\_vh](https://avatars.discourse-cdn.com/v4/letter/b/bb73d2/32.png) [@beto\_vh](https://community.deeplearning.ai/u/beto_vh)\
**Post date:** [October 4, 2021, 4:04pm UTC](https://community.deeplearning.ai/t/c5-w2-a2-emojify/24080/8 "2021-10-04T16:04:11Z")

</div>

Hi, I’m having the same problem.

Test accuracy varies between 62 to 73%.

Things I already checked:  
I am not using sep=’ ’ in the split() functions.  
I set embedding\_layer.trainable = False in the pretrained\_embedding\_layer function.  
I use ‘softmax’ as the activation function: Activation(‘softmax’)(X)

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

Any ideas?

---

<div class="post-metadata">

**Author:** ![Zhihan\_Zhang](https://avatars.discourse-cdn.com/v4/letter/z/a183cd/32.png) [@Zhihan\_Zhang](https://community.deeplearning.ai/u/Zhihan_Zhang)\
**Post date:** [October 31, 2022, 4:58am UTC](https://community.deeplearning.ai/t/c5-w2-a2-emojify/24080/9 "2022-10-31T04:58:44Z")

</div>

See this:

> [@Week2 Emoji\_v3a low test accuracy but passed the grader](https://community.deeplearning.ai/t/week2-emoji-v3a-low-test-accuracy-but-passed-the-grader/103405/7):
>
> Found the issue - the test dataset CSV file has been mishandled in the past, and the strings contain \t (TAB character) at the end. The training set does not suffer from this issue. I used .split(’ ') to separate the words, which meant the last word of the sentence had a \t stuck to it and was not in the dictionary. The solution is to always use .split() without argument, which strips whitespace by default. With correctly split words, I’m getting 82% accuracy, which is within the expected rang…

After splitting with all the white characters(default setting of .split), my acc bumped to 83%.
