I have completed the assignment 2 of the week 2 of Course 5 with all the test cases passed. Yet it is showing the same error each time I submit my assignment.
It appears that your code has an error that was not caught by any of the unit tests.
{edited}
Sorry for not updating about it.
This error occurred because of wrong initialization of the average word vector due to which it was showing an error of the shapes not being aligned. The issue is now resolved.
I’m facing the exact same issue. Can you please share exactly how you solved this issue?
Thank you.
Personally, my error was to initialize like this :
avg = 0
Rather than : (It solved my error)
any_word = list(word_to_vec_map.keys())[0]
avg = np.zeros((word_to_vec_map[any_word].shape[0],))
i.e : avg = np.zeros((50,))
1 Like
Had the same issue, your solution solved it. Thanks!