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

Add regularization terms in klqp.py #813

Merged
merged 3 commits into from
Jan 5, 2018
Merged

Add regularization terms in klqp.py #813

merged 3 commits into from
Jan 5, 2018

Conversation

siddharth-agrawal
Copy link
Contributor

Added regularization terms in the loss functions and gradient calculations in klqp.py. This partially fixes #529. If this change is on the right track, will update the remaining files in the next few commits.

@dustinvtran
Copy link
Member

dustinvtran commented Jan 2, 2018

Thanks!

I'm okay with not having this include a unit test. Perhaps if or when you implement it for ed.MAP, it would be nice to show they return the same answer.

Can you add a sentence or two in the Notes section of each KLqp class? E.g.,

The objective function also adds to itself a summation over all tensors 
in the `REGULARIZATION_LOSSES` collection.

@siddharth-agrawal
Copy link
Contributor Author

@dustinvtran Updated with the relevant changes.

@dustinvtran
Copy link
Member

Thanks!

@dustinvtran dustinvtran merged commit 48dbee4 into blei-lab:master Jan 5, 2018
@siddharth-agrawal siddharth-agrawal deleted the variational_regularization branch January 6, 2018 18:16
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.

Add regularization loss in build_loss_and_gradients?
2 participants