BIGKUANG / deeplearning.ai

There are all deeplearning.ai assigniment of Andrew Ng in coursera
74 stars 50 forks source link

correct one mistake in course5's assignment5-2 word_vecotr_representation #3

Open DoubleYing opened 6 years ago

DoubleYing commented 6 years ago

in this function: neutralize(word, g, word_to_vec_map): when you calculate e_w1B and e_w2B, your code is `e_w1B = (np.dot(w1, bias_axis)/np.linalg.norm(bias_axis)* 2) bias_axis

e_w2B = (np.dot(w2, bias_axis)/np.linalg.norm(bias_axis)* 2) bias_axis`

the right code is: `e_w1B = (np.dot(e_w1, bias_axis)/np.linalg.norm(bias_axis)*2) bias_axis

e_w2B = (np.dot(e_w2, bias_axis)/np.linalg.norm(bias_axis)*2) bias_axis`