Skip to content
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

Adding Mean Field LDA draft example (yields bad results) #2659

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

ucals
Copy link
Contributor

@ucals ucals commented Oct 8, 2020

Hey guys,
As requested in the forum, I'm opening a draft PR with the buggy Mean Field LDA code. Glad to talk if comments!
Cheers!
Carlos


# Remove docs with zero length (2 occurrences) and pad docs with 0 index
docs = [doc for doc in docs if len(doc) > 0]
docs = pad_sequence(docs, batch_first=True, padding_value=0)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure that padding each document with zeros is a good idea? doesn't that affect the performance of the model?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slayeren this implementation uses dense tensors and Pyro's automatic enumeration to integrate out zeta and is indeed quite slow (hence the title :) ). See the ProdLDA tutorial for a less naive approach to topic modeling in Pyro.

Please use our forum for any followup questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants