-
Notifications
You must be signed in to change notification settings - Fork 132
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
Example Code for Use #4
Comments
Agreed, it's opaque how to use this for new documents after training, which went great. Any chance of some more insight into how to apply it? |
Same question ! |
That would be Very helpful, I hope you can provide us with such functions |
Same question |
any update ? I have the same question |
Same question! |
I am on the same issue - there are various places where you can get a return value which is the size of your topics, which is what you want, from looking at the eval script I have this: NUM_TOPICS = 128
def predict(normd_bow):
thetaAvg = torch.zeros(1, NUM_TOPICS)
sums = normd_bow.sum(1).unsqueeze(1)
thetaWeightedAvg = torch.zeros(1, NUM_TOPICS)
theta, _ = model.get_theta(normd_bow)
thetaAvg += theta.sum(0).unsqueeze(0) / normd_bow.shape[0]
weighed_theta = sums * theta
thetaWeightedAvg += weighed_theta.sum(0).unsqueeze(0)
return thetaWeightedAvg Created from this code. EDIT: I have no idea if this is correct! |
I'm having some trouble figuring out the appropriate input and output for the model after it is created. Is there any example you can provide for the use and what I can expect to have returned? As I understand it, it should return the predicted topics, with the embedding of the document being passed, correct?
The text was updated successfully, but these errors were encountered: