W1-Ex6 Getting 0.5 accuracy in

Hi there, when I want to train my model I got 0.5 percent accuracy in ex6. even though it should be about 1.0 it pass the test.
however in ex8 it fails the test because of this problem. does anyone know why this is happening I think there is something wrong with my data generator ex2.
thanks guys.

Hi @Mohammad_Moein

Do you pass all the test for prior exercises?

yes I did

Then the first place to look would be to make sure that you do not use global variables inside the functions.
For example, in UNQ_C1 do not use Vocab variable but use vocab_dict parameter. Same thing for all the parameters in all the functions you implemented.

You were right, the problem solved, thank you.