C4_W1_C6 next_symbol returns AssertionError

Hi, I’m stuck with next_symbol function
I have tried multiple variants of log_probs, however I keep getting the same (similar) error:
AssertionError Traceback (most recent call last)
in
1 # UNIT TEST
2 # test_next_symbol
----> 3 w1_unittest.test_next_symbol(next_symbol, NMTAttn)

~/work/w1_unittest.py in test_next_symbol(target, model)
557 next_de_tokens = target(the_model, tokens_en, [18477], 0.0)
558 # print(‘next_de_tokens’, next_de_tokens)
→ 559 assert np.allclose([next_de_tokens[0], next_de_tokens[1]], [7283, -9.929085731506348]), f"Expected output: [{7283}, {-9.929085731506348}], your output: [{next_de_tokens[0]}, {next_de_tokens[1]}]"
560
561 print(“\033[92m All tests passed”)

AssertionError: Expected output: [7283, -9.929085731506348], your output: [7283, -2.295468330383301]

Hi @M113, this error indicates that your function returns an incorrect value that doesn’t match the expected one. This maybe relates to the calculating log probs that you already mentioned it.
Can you please send your code to check it?

Hi @Mahdi_Molaei!
Thank you for your help. I have already gotten assistance from your colleague. The issue is solved.
However, I’d like to mention that this week is the worst from the whole specialization. The programming assignment is rather confusing than helping.

Best, M

@M113
You’re welcome. I’m happy that the issue is solved. In addition, you can ask anything confusing about the specialization and we would be glad to help you :wink:
Best,