I trained supervised model using hs loss.
When I am trying to get predicted label by get_output_matrix()*sentence_vector I got irrelevant results compared to method predict. Is this because we have bias vector for both hidden and output layer? Is there a way to get it via python api?
np.argmax(np.matmul(model.get_output_matrix(), model.get_sentence_vector(sentence)))
vs
np.predict(sentence)
` ``
Yes you can. However, the prediction scores won't match because fasttext applies a softmax on the output, so you can do that if you want them to match.
I trained supervised model using hs loss. When I am trying to get predicted label by get_output_matrix()*sentence_vector I got irrelevant results compared to method predict. Is this because we have bias vector for both hidden and output layer? Is there a way to get it via python api?