C5W2A1 Equalize function - incorrect output

Hi,
I am not able to get the right answer for the last optional assignment of Course 5 Week Assignment 1, Exercise 4: equalize.
The output that is shown is:

cosine similarities before equalizing:
cosine_similarity(word_to_vec_map[“man”], gender) = -0.11711095765336832
cosine_similarity(word_to_vec_map[“woman”], gender) = 0.35666618846270376

cosine similarities after equalizing:
cosine_similarity(e1, gender) = 0.034078253369881704
cosine_similarity(e2, gender) = 0.19818963945016957

I don’t want to post the code but my lab id is:
mxzehnol

Could somebody have a look at my code or tell me what the intermediate values of the variables should be so I can keep debugging?

Thanks

Hi Alex_Braaksma,

I hope you were able to resolve this. If not, feel free to send me a copy of your notebook attached to a direct message so I can have a look at what’s going on. Unfortunately, I cannot access your code through your lab id.

I had the same error and found it hard to debug, so for future learners: equations (5), (7) and (8) require np.dot() and you are probably not using it :wink: