-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
some errors #4
Comments
Hi, Could you please kindly post the error message? |
Thank you for your attention. I cannot upload my screenshot and can only provide my error in this way. I look forward to your reply. |
The error may occur when using a different version of the scikit-learn package. For 0.23.2 version of sklearn, it is ok. |
In the "lad_topic_model.py" file, I made a modification to the line:
temp = OneHotEncoder(sparse=False, handle_unknown='ignore', categories=np.arange(vocab_size).reshape([1, vocab_size]))
.fit_transform(word_labels.reshape([-1,1])) * word_scores
I modified it to:
temp = OneHotEncoder(sparse=False, handle_unknown='ignore', categories=[np.arange(vocab_size)])
.fit_transform(word_labels.reshape([-1, 1])) * word_scores
This change seems to be an attempt to fix an issue. However, I mentioned that there is still an error in the "loss.py" file, specifically in the line:
loss = -attr * loss_mask.cuda() * func.log_softmax(feat, 1)
but I don't know how to modify.
Looking forward your reply.
The text was updated successfully, but these errors were encountered: