Open DoubleYing opened 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`
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`